A newer version of the Gradio SDK is available: 6.14.0
title: Aphasia Prediction with FC Visualization
emoji: 🧠
colorFrom: indigo
colorTo: red
sdk: gradio
sdk_version: 3.50.0
app_file: app.py
pinned: false
Aphasia Prediction with VAE and FC Visualization
This application predicts aphasia scores based on patient demographics and visualizes functional connectivity (FC) patterns in the brain.
Features
Predict aphasia severity (WAB AQ score) based on patient demographic data
Option to manually set aphasia scores
Display functional connectivity heatmap and matrix values
Interactive visualization of brain region connectivity
Customizable demographic parameters
Usage
First, if you haven't trained the model, go to the "Train Model" tab and click "Train Model"
When the model is ready, go to the "Predict & Visualize" tab
Adjust the demographic sliders for age, months post onset, education, gender, and handedness
Select an aphasia type and set initial severity and lesion size
Click "Generate Functional Connectivity" to see the predictions and visualization
Optionally override the model's prediction with a custom score
Explore the functional connectivity matrix visualization and detailed values
Technical Details
The application uses:
A Variational Autoencoder (VAE) from the DemoVAE package for learning latent representations of brain connectivity
Random Forest regression to predict aphasia scores from latent features and demographics
Gradio web interface for interactive visualization
Analysis of key brain connectivity patterns and their relationship to aphasia
Deployment
The application can be deployed using:
# Install requirements
pip install -r requirements.txt
# Run the Gradio app
python app_gradio.py
Hugging Face Spaces Deployment
This app is designed to be deployed on Hugging Face Spaces:
Create a new Space and select Gradio as the SDK
Upload the files or connect to your GitHub repository
The app will automatically deploy and be available online
Note: The initial model training may take some time when you first run the application.