A newer version of the Gradio SDK is available:
5.43.1
Local Testing Guide for GAIA Agent
This document outlines how to test the GAIA agent locally during development.
Setup
Install dependencies:
pip install -r requirements.txt
If you want to use the OAuth features locally:
huggingface-cli login
Or set the
HF_TOKEN
environment variable with your token from HF Settings.
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:
python app_local.py
Or use the helper script:
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:
python app2.py
When the application loads:
- Enter a test username in the "Or enter test username for local development" field
- Click "Run Evaluation & Submit All Answers"
Option 3: Full Application with OAuth
To test the complete application with OAuth authentication:
- Make sure you're logged in to Hugging Face CLI:
huggingface-cli login
- Run:
python app.py
orpython app2.py
- Click the "Login" button in the interface
- After logging in, click "Run Evaluation & Submit All Answers"
Debugging
If you encounter OAuth-related errors:
- Check if you're logged in with
huggingface-cli whoami
- Try setting your Hugging Face token as an environment variable:
export HF_TOKEN=your_token_here
- Use the local testing version (
app_local.py
) which avoids OAuth entirely
Next Steps
- Replace the mock agent in
app_local.py
with your real agent implementation - Test with a small set of sample questions before scaling up
- Gradually add and test tools (web search, file reader, etc.)
- When ready, deploy to Hugging Face Spaces for full evaluation