A simple Flask web application for predicting liver cirrhosis stages using a pre-trained machine learning model.
-
Install dependencies:
pip install -r requirements.txt
-
Run the Flask app:
python app.py
-
Access the app:
- Open your browser and go to:
http://localhost:5000 - Fill in the patient data and click "Predict Stage"
- Open your browser and go to:
You can also use the JSON API endpoint:
curl -X POST http://localhost:5000/api/predict \
-H "Content-Type: application/json" \
-d '{
"Prothrombin": 10.6,
"Platelets": 251.0,
"Albumin": 3.5,
"Age_years": 50.7,
"Bilirubin": 1.3,
"Sex": "M",
"Drug": "D-penicil"
}'- Simple web form for manual input
- JSON API for programmatic access
- Real-time predictions using pre-trained model
- Probability scores for each stage
- Clean, responsive UI
app.py- Main Flask applicationmodels/- Pre-trained model and preprocessorsrc/- Original ML scripts (training, preprocessing, etc.)data/- Training datasets