--- title: BCI emoji: 🏃 colorFrom: indigo colorTo: red sdk: gradio sdk_version: 4.36.1 app_file: app.py pinned: false license: apache-2.0 --- # EEG Signal Processing and Classification This Gradio Space allows you to process and classify EEG signals. You can upload EEG data, label it, preprocess the data, and train a machine learning model directly in your browser. ## Overview This project provides an interface for: 1. Uploading and previewing EEG data. 2. Labeling data segments. 3. Preprocessing data to extract features. 4. Training a machine learning model. 5. Downloading the trained model and scaler. ## Demo Check out the video demonstration below to see how to use the interface: [![EEG Signal Processing Demo](https://img.youtube.com/vi/_vWz-p26roY/maxresdefault.jpg)](https://www.youtube.com/watch?v=_vWz-p26roY) ## Full Instructable For a detailed step-by-step guide, visit Instructable page [here](https://www.instructables.com/Controlling-Video-Game-Using-Brainwaves-EEG/). ## Usage ### Uploading Data 1. Click on the "Upload CSV File" button to upload your EEG data. 2. Preview the uploaded data in the "Data Preview" section. ### Labeling Data 1. Enter the start index, end index, and label for each segment in the "Ranges for Labeling" section. 2. Click on the "Label Data" button to apply the labels. ### Training the Model 1. Click on the "Train Model" button to preprocess the data and train the model. 2. Download the trained model and scaler using the provided links. ## File Descriptions - `app.py`: Contains the Gradio interface and main application logic. - `requirements.txt`: Lists the dependencies required to run the project. - `model.pkl`: The trained machine learning model (generated after training). - `scaler.pkl`: The scaler used to preprocess the data (generated after training). ## License This project is licensed under the apache-2.0. ## Acknowledgments - Special thanks to the contributors and the open-source community. - Thanks to the authors of the libraries used in this project. Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference