Logo Lanfrica

ocgodsgift/ehealth-africa-covid19-flask-api

Domaine:

healthcare

Type de record:

software
Créateur:
ocg
Hôte:
# eHealth Africa COVID-19 Prediction App A Flask-based web application that predicts COVID-19 infection risk based on symptoms input by the user. ## Prerequisites Before running this application, make sure you have the following installed: - Python 3.7 or higher - pip (Python package manager) ## Installation 1. Clone or download this project to your local machine. 2. Navigate to the project directory: ``` cd covid-prediction-app ``` 3. Create a virtual environment (recommended): ``` python -m venv venv ``` 4. Activate the virtual environment: - On Windows: ``` venv\Scripts\activate ``` - On macOS/Linux: ``` source venv/bin/activate ``` 5. Install the required dependencies: ``` pip install -r requirements.txt ``` If you don't have a requirements.txt file, install the packages manually: ``` pip install flask pandas scikit-learn joblib ``` ## Required Files Make sure you have the following files in the project directory: - `model.pkl` - Your trained machine learning model - `features.pkl` - The features used by the model If you don't have these files, you'll need to train the model first or obtain these files from the original source. ## Running the Application 1. Start the Flask development server: ``` python app.py ``` 2. Open your web browser and navigate to: ``` localhost ``` 3. The application should now be running. You can: - Select symptoms from the checklist - Click the "Predict COVID-19 Status" button - View the prediction result ## Project Structure ``` covid-prediction-app/ │ ├── app.py # Main Flask application ├── model.pkl # Trained machine learning model ├── features.pkl # Features used by the model ├── requirements.txt # Python dependencies ├── README.md # This file └── templates/ └── index.html # Web interface ``` ## API Endpoints - `GET /` - Returns the main web interface - `POST /predict` - Accepts symptom data and returns a prediction ## Troubleshooting 1. **ModuleNot …