What is the best way to run a python file on a front end?

I am developing a medical app that uses sci-kit for machine learning.

I have developed a Python file for the logic of my app. It takes input a couple of times from the command line and then uses the responses to predict what disease a user is suffering from. The problem I'm having is how to put it on a front-end so that anyone can use it.

I have tried using Django, ReactJS, Flask, and PyScript so far, and the main problem I'm facing is that all tutorials are showing me how to support scripts in Python with only one input. My app predicts what symptoms the user might be suffering from next, and so needs to pass the next question to the front end while remembering what state it is in, requiring multiple inputs.

I am looking for any frameworks, api's or general info that might be useful in my situation.

Any help would be appreciated.

Back to Top