Covid-19 Detector which gives the probability of a patient being infected from covid-19 virus using Logistic regression model in Machine learning based on the symptoms.
Visit website below to use the webapp:
http://covidprediction.pythonanywhere.com
You must have Scikit Learn, Pandas, numpy (for Machine Leraning Model) and Flask, ninja2 (for API) installed.
Install requirements using : pip install -r requirements.txt
This project has three major parts :
- training.py - This contains code for our Machine Learning model to predict the probability of a patient having COVID-19 infection based on training data in 'data.csv' file and updates 'model.pkl'.
- app.py - This contains Flask APIs that receives patient's symptoms details through GUI or API calls, computes the precited value based on our model and returns it.
- templates - This folder contains the HTML templates to allow user to enter patient sympyoms and displays the predicted infection probability. Templates in this project are : index.html, result.html, contact.html and about.html.
-
Ensure that you are in the project home directory. Create the machine learning model by running the command below -
python training.py
This would create a serialized version of our model into a file model.pkl
-
Run app.py using below command to start Flask API
python app.py
flask will run on port 8000.
-
Navigate to URL http://localhost:8000
You should be able to view the homepage as below :
-
Enter valid values, select options in all the input boxes and hit Submit. (as shown above)
If everything goes well, you should be able to see the predcited probability in terms of percentage(multiplied by 100) vaule on the 'result.html' page!