I've managed to do something like this using a deep learning model.
It's fairly simple everything you're doing in python can be done in the django project you just have to create views and forms to handle the user data input.
So you're either new to django or want the whole code snippets ?
My project is the conception and realization of a web application for the detection of ransomwares based on machine learning.
For the realization, I made a web application with python, Django, HTML and CSS.
On the other hand i have to create a machine learning code that makes the detection of these ransomware viruses.
Now what I have to do is deploy the machine learning code in my web app.
I'll explain a little how it works, the user first registers and then he chooses a csv file to scan, he uploads it and then he chooses the machine learning model he wants  use and then he clicks on scan, when he clicks on scan the file will be scanned by the model he has chosen and a result will be returned to him which is either 1: the file is a ransomware or 0: it is not a ransomware.
So,
I built the web app, I built the model
Now my problem is how to pass user input to the model
And than take the model's out put to the user.
Need help please.
How to deploy a machine learning model in a django web app?