How to call a python file (.py) in a forge app

I want to use my model written in Python to classify the issues and use Forge Cloud to display the result. But as far as I know, forge doesn’t support Python so I was wondering how can I integrate my Python code with the index.js file. Any suggestion would be a great help.

@SumitSuman,

In short, you can’t. There’s no Python interpreter available in the Forge Runtime.

To explain, The Forge Runtime is not an arbitrary computing environment. What the docs explain is:

At the heart of Forge is a serverless FaaS hosting platform, powered by AWS Lambda. Apps created with Forge run inside a security layer that enforces tenancy isolation and data egress restriction by design.

Elaborated over subsequent docs is the Forge Runtime is effectively a Node.js environment with a tenant-focused security model that severely limits access to infrastructure.

I would 2nd @PaoloCampanelli’s prior answer, elaborating that Forge is not itself a general purpose AI/ML development platform. If you want to understand how to mix the Forge with AI, I’d recommend starting with @dmorrow’s blog post on Forge AI Basics. With that, you might better understand what Paolo is suggesting in a mixed architecture using Forge Remote, where you would substitute your own “back-end” for what Dugald has illustrated with OpenAI.

2 Likes

Thanks for the suggestion, The Forge Remote was really helpful.

Thank you