Spaces:
Sleeping
Sleeping
Deploying SigmaTriple to Hugging Face Spaces
This guide will help you deploy the SigmaTriple application to Hugging Face Spaces.
Prerequisites
- A Hugging Face account (sign up at huggingface.co)
- Git installed on your local machine
- Hugging Face CLI (optional, for command line deployment)
Deployment Steps
Option 1: Using the Hugging Face Web Interface
Create a New Space:
- Go to huggingface.co/spaces
- Click on "Create new Space"
- Enter a name for your Space (e.g., "SigmaTriple")
- Select "Streamlit" as the SDK
- Choose "Public" or "Private" visibility
- Select "T4" as the Hardware (GPU is recommended for this application)
- Click "Create Space"
Upload Files:
- You can either upload the files directly through the web interface
- Or clone the Space repository and push the files using Git (recommended)
Git Deployment:
# Clone your new Space repository git clone https://huggingface.co/spaces/YOUR_USERNAME/SigmaTriple # Copy all files from this project to the cloned repository cp -r * /path/to/cloned/repo/ cp -r .streamlit /path/to/cloned/repo/ cp .gitignore /path/to/cloned/repo/ # Navigate to the cloned repository cd /path/to/cloned/repo # Add all files git add . # Commit the changes git commit -m "Initial commit of SigmaTriple application" # Push to Hugging Face Spaces git push
Wait for Deployment:
- Hugging Face will automatically build and deploy your Space
- This may take a few minutes, especially for the first deployment
- You can monitor the build process in the "Settings" tab of your Space
Option 2: Using Hugging Face CLI
Install the Hugging Face CLI:
pip install huggingface_hub
Login to Hugging Face:
huggingface-cli login
Create a New Space:
huggingface-cli repo create SigmaTriple --type space --sdk streamlit
Clone and Push:
git clone https://huggingface.co/spaces/YOUR_USERNAME/SigmaTriple cp -r * /path/to/cloned/repo/ cp -r .streamlit /path/to/cloned/repo/ cp .gitignore /path/to/cloned/repo/ cd /path/to/cloned/repo git add . git commit -m "Initial commit of SigmaTriple application" git push
Configuration Options
You can customize your Space by modifying the following files:
.streamlit/config.toml
: Streamlit configurationREADME.md
: Documentation and Space descriptionrequirements.txt
: Python dependenciespackages.txt
: System dependencies
Troubleshooting
If you encounter any issues during deployment:
Check the Build Logs:
- Go to the "Settings" tab of your Space
- Look for any error messages in the build logs
Common Issues:
- Memory Errors: The model requires significant memory. Make sure you're using a GPU instance.
- Dependency Issues: Check that all required packages are listed in requirements.txt and packages.txt.
- Timeout Errors: The initial model loading might take time. Hugging Face Spaces has a build timeout of 10 minutes.
Reduce Model Size:
- If you're experiencing memory issues, you can modify app.py to use a smaller model or implement model loading optimizations.
Accessing Your Space
Once deployed, your Space will be available at:
https://huggingface.co/spaces/YOUR_USERNAME/SigmaTriple
You can share this URL with others to let them use your application.