How to combine Python and Java for AI development

Python gained a natural first mover advantage in AI agent development that wasn't quite earned. Python is a great language whose intuitiveness and low ceremony are an asset to ML, but while ML is about computation and experimentation, AI is about context and structure. This is why statically typed programming languages proven in the enterprise like Java, Kotlin, C#, and TypeScript are better suited to AI than Python. But what if we didn't have to choose? After all, the prerequisite for successful AI is a data strategy with the governance to know everything you have and how to access it, and it would be amazing to leverage the rich Python ecosystem, including the vast library of Hugging Face models and its outstanding Transformers framework, to implement that strategy in a way that makes integration with a more enterprise-friendly technology like Java seamless. We're getting there. This GraalPy Spring Boot Summarization Demo on GitHub (link in comments) shows how you can leverage GraalPy to run the #Python libraries markitdown and Transformers along with the HuggingFaceTB/SmolLM2-360M model to process PDFs in a Spring Boot app written in #Java. This is super cool and I can't wait to see what's next.

  • GraalPy Spring Boot Summarization Demo
This demo embeds markitdown and transformers via GraalPy in a Spring Boot app.

To view or add a comment, sign in

Explore content categories