File size: 1,568 Bytes
45d1690
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# 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](https://github.com/settings/tokens)

## Local Development

1. Create a `.env` file in the project root:
```bash
GITHUB_TOKEN=your_github_token_here
```

2. Load environment variables:
```bash
export $(cat .env | xargs)
```

3. Run the application:
```bash
python app.py
```

## HuggingFace Spaces Deployment

1. **Create your Space** on HuggingFace
2. **Add Repository Secret**:
   - Go to your Space's settings
   - Navigate to "Repository secrets" or "Variables and secrets"
   - Add `GITHUB_TOKEN` with your GitHub Personal Access Token value
3. **Deploy your code** - the `install_dependencies.py` script will automatically handle private repository installation

## How It Works

- `requirements.txt` contains only public dependencies
- `install_dependencies.py` handles private repository installation using environment variables
- `app.py` calls the installation script at startup
- No sensitive tokens are stored in version control

## Troubleshooting

If you see "Warning: GITHUB_TOKEN environment variable not found":
1. Verify the environment variable is set correctly
2. Check that your token has `repo` permissions
3. Ensure the token hasn't expired
4. Verify you have access to the `huongngo-8/olmoasr` repository