This Flask web application is designed to predict epileptic seizures using EEG (Electroencephalogram) data. It uses a Python backend with Flask to create an interactive platform where users can input EEG data and receive seizure predictions.
- EEG Data Visualization: Visualizes EEG signal data as plots.
- Seizure Prediction: Utilizes a predictive model to assess the likelihood of a seizure from EEG data.
- Python 3.x
- Flask
- Numpy
- Pandas
- Matplotlib
- A pre-trained seizure prediction model (
predict
function inmodel.py
).
- Install Python 3.x and pip.
- Install Flask, Numpy, Pandas, and Matplotlib:
pip install Flask numpy pandas matplotlib
- Set up the seizure prediction model in
model.py
.
- Run the Flask application:
python app.py
- Open
http://127.0.0.1:5000/
in a web browser. - Input the EEG data index (assumed to be a row index of a CSV file).
- Submit to view the EEG signal plot and receive the seizure prediction.
app.py
: The main Flask application file with routes and logic for data processing and prediction.model.py
: Contains thepredict
andbase
functions for seizure prediction.templates/index.html
: HTML template for the user interface.static/
: Folder for storing generated EEG signal plots.
- The application reads EEG data from a CSV file (
Epileptic Seizure Recognition.csv
). - Users submit an index, which corresponds to a row in the CSV file.
- The app visualizes the EEG signal for the specified index and uses the predictive model to assess seizure risk.
- The results, including the EEG signal plot and prediction, are displayed on the web page.
- Pianalytix for creating their Data Science Bundle course.