Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.3.0
Setup Instructions
Prerequisites
- Python 3.11+
- Virtual environment (already created in
venv/)
Quick Start
Option 1: Using the run script (Recommended)
./run.sh
Option 2: Manual setup
- Create a
.envfile in the root directory with your HuggingFace read token:
echo "READ_TOKEN=your_huggingface_read_token_here" > .env
To get a HuggingFace token:
Create a new token with "Read" permissions
Copy the token and paste it in your
.envfileActivate the virtual environment:
source venv/bin/activate
- Run the application:
python app.py
What Happens on First Run
The app will automatically download:
- Models to
model_classification/directory (fromSerrelab/fossil_classification_models) - SAM Model to
model/directory (fromSerrelab/SAM_Leaves) - Datasets to
dataset/andimages/directories (fromSerrelab/FossilsandSerrelab/image_examples_gradio)
Note: These downloads require a valid READ_TOKEN in your .env file.
Accessing the App
Once running, the app will be available at:
- Local URL: http://localhost:7860
- The URL will be displayed in the terminal when the app starts
Troubleshooting
"401 Unauthorized" Error
- Make sure you have created a
.envfile with a validREAD_TOKEN - Verify your token has "Read" permissions at https://huggingface.co/settings/tokens
Models Already Downloaded
- If models are already present in
model_classification/andmodel/directories, the app will skip downloading - You can still run the app without a token if models are already present