Prognostica is a Flask-based web application designed for medical ailment classification. The app takes symptom data as input and predicts the likely disease using a Naive Bayes classifier. It leverages a dataset containing various symptoms and corresponding diseases, providing quick and accurate predictions.
- Naive Bayes Classification: The app uses a Multinomial Naive Bayes model for disease prediction based on the provided symptoms.
- Flask API: The application provides a RESTful API endpoint (
/predict
) to accept symptom data and return disease predictions in JSON format. - Data Handling: The app processes and cleans the data, filling in missing values and preparing it for the model.
-
Clone the repository:
git clone https://github.com/yourusername/prognostica.git cd prognostica
-
Install the required Python packages:
pip install -r requirements.txt
-
Place your symptom dataset in the root directory as
csvfile.csv
. -
Run the application:
python server.py
The app will start running on the local server (
192.168.43.204
) at port5051
.
-
POST
/predict
: This endpoint accepts a JSON object with the key"data"
containing a list of symptoms.Request Example:
{ "data": ["fever", "cough", "headache"] }
Response Example:
{ "disease": "[Malaria]" }