A newer version of the Gradio SDK is available:
6.1.0
Deployment Instructions
Environment Variables
This application requires the following environment variables:
GITHUB_TOKEN
- Purpose: Access to private GitHub repository
huongngo-8/olmoasr - Required permissions:
repo(for private repository access) - How to get: Go to GitHub Settings > Personal Access Tokens
Local Development
- Create a
.envfile in the project root:
GITHUB_TOKEN=your_github_token_here
- Load environment variables:
export $(cat .env | xargs)
- Run the application:
python app.py
HuggingFace Spaces Deployment
- Create your Space on HuggingFace
- Add Repository Secret:
- Go to your Space's settings
- Navigate to "Repository secrets" or "Variables and secrets"
- Add
GITHUB_TOKENwith your GitHub Personal Access Token value
- Deploy your code - the
install_dependencies.pyscript will automatically handle private repository installation
How It Works
requirements.txtcontains only public dependenciesinstall_dependencies.pyhandles private repository installation using environment variablesapp.pycalls the installation script at startup- No sensitive tokens are stored in version control
Troubleshooting
If you see "Warning: GITHUB_TOKEN environment variable not found":
- Verify the environment variable is set correctly
- Check that your token has
repopermissions - Ensure the token hasn't expired
- Verify you have access to the
huongngo-8/olmoasrrepository