File size: 2,143 Bytes
87aad23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Local Testing Guide for GAIA Agent

This document outlines how to test the GAIA agent locally during development.

## Setup

1. Install dependencies:
   ```bash
   pip install -r requirements.txt
   ```

2. If you want to use the OAuth features locally:
   ```bash
   huggingface-cli login
   ```
   Or set the `HF_TOKEN` environment variable with your token from [HF Settings](https://huggingface.co/settings/tokens).

## Running the Application

### Option 1: Simplified Local Testing (Recommended for Development)

Use `app_local.py` which has a mock agent and doesn't require OAuth:

```bash
python app_local.py
```

Or use the helper script:

```bash
bash run_local.sh
```

This will:
- Install required dependencies
- Run the local version of the app
- Use a mock agent that returns test responses
- Use local sample questions without making API calls
- Not submit any answers to the actual API

### Option 2: Full Application with Test Username

If you want to test the full application but without requiring login:

```bash
python app2.py
```

When the application loads:
1. Enter a test username in the "Or enter test username for local development" field
2. Click "Run Evaluation & Submit All Answers"

### Option 3: Full Application with OAuth

To test the complete application with OAuth authentication:

1. Make sure you're logged in to Hugging Face CLI: `huggingface-cli login`
2. Run: `python app.py` or `python app2.py`
3. Click the "Login" button in the interface
4. After logging in, click "Run Evaluation & Submit All Answers"

## Debugging

If you encounter OAuth-related errors:
1. Check if you're logged in with `huggingface-cli whoami`
2. Try setting your Hugging Face token as an environment variable:
   ```
   export HF_TOKEN=your_token_here
   ```
3. Use the local testing version (`app_local.py`) which avoids OAuth entirely

## Next Steps

1. Replace the mock agent in `app_local.py` with your real agent implementation
2. Test with a small set of sample questions before scaling up
3. Gradually add and test tools (web search, file reader, etc.)
4. When ready, deploy to Hugging Face Spaces for full evaluation