Spaces:
Sleeping
Sleeping
small fixes, new read.me and better requirements notes
Browse files- README.md +34 -1
- app.py +1 -1
- requirements.txt +7 -6
README.md
CHANGED
|
@@ -12,4 +12,37 @@ hf_oauth: true
|
|
| 12 |
hf_oauth_expiration_minutes: 480
|
| 13 |
---
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
hf_oauth_expiration_minutes: 480
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# GAIA Agent Evaluation Runner
|
| 16 |
+
|
| 17 |
+
Small Gradio app for the Hugging Face Agents Course final assignment.
|
| 18 |
+
|
| 19 |
+
The app logs in with Hugging Face OAuth, downloads the GAIA evaluation questions, runs a `smolagents` agent on each question, and submits the answers to the scoring endpoint.
|
| 20 |
+
|
| 21 |
+
## Setup
|
| 22 |
+
|
| 23 |
+
Create a `.env` file with the secrets needed by the model provider and by Hugging Face Spaces:
|
| 24 |
+
|
| 25 |
+
```bash
|
| 26 |
+
HF_TOKEN=your_token_here
|
| 27 |
+
SPACE_ID=your-username/your-space-name
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
Install the dependencies:
|
| 31 |
+
|
| 32 |
+
```bash
|
| 33 |
+
python3 -m venv .venv
|
| 34 |
+
source .venv/bin/activate
|
| 35 |
+
pip install -r requirements.txt
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
Run locally:
|
| 39 |
+
|
| 40 |
+
```bash
|
| 41 |
+
python app.py
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## Notes
|
| 45 |
+
|
| 46 |
+
- The app uses `https://agents-course-unit4-scoring.hf.space` as the scoring API.
|
| 47 |
+
- The Gradio SDK version is pinned in this README frontmatter and dependencies are pinned in `requirements.txt`.
|
| 48 |
+
- OAuth must be enabled on the Hugging Face Space for the login flow to work.
|
app.py
CHANGED
|
@@ -124,7 +124,7 @@ class BasicAgent:
|
|
| 124 |
VisitWebpageTool(),
|
| 125 |
self.file_tool,
|
| 126 |
],
|
| 127 |
-
max_steps=
|
| 128 |
verbosity_level=0,
|
| 129 |
additional_authorized_imports=[
|
| 130 |
"json",
|
|
|
|
| 124 |
VisitWebpageTool(),
|
| 125 |
self.file_tool,
|
| 126 |
],
|
| 127 |
+
max_steps=15,
|
| 128 |
verbosity_level=0,
|
| 129 |
additional_authorized_imports=[
|
| 130 |
"json",
|
requirements.txt
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
-
gradio
|
| 2 |
-
requests
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
| 1 |
+
gradio==5.25.2
|
| 2 |
+
requests==2.32.5
|
| 3 |
+
pandas==2.3.3
|
| 4 |
+
smolagents[openai]==1.24.0
|
| 5 |
+
ddgs==9.14.0
|
| 6 |
+
wikipedia-api==0.10.2
|
| 7 |
+
python-dotenv==1.2.2
|