File size: 1,965 Bytes
2705160 62ad9da 2705160 d123508 2705160 08fe068 | 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 | ---
title: Template Final Assignment
emoji: π΅π»ββοΈ
colorFrom: indigo
colorTo: indigo
sdk: gradio
sdk_version: 5.25.2
app_file: app.py
pinned: false
hf_oauth: true
hf_oauth_expiration_minutes: 480
---
# GAIA Agent β Final Assignment
A `smolagents` CodeAgent built to answer GAIA Level 1 questions for the HF
Agents course final assignment. Uses HF Inference Providers for the LLM and a
small toolset for browsing, files, audio, and images. Self-consistency +
verifier pass on top to maximize exact-match score.
## Where things live
| File | Purpose |
| ------------- | -------------------------------------------------------- |
| `app.py` | Gradio UI + run-and-submit pipeline |
| `agent.py` | `GaiaAgent` class β self-consistency + verifier |
| `tools.py` | 8 tools (search, browse, wiki, YT, file, table, ASR, VLM)|
| `config.py` | **All non-secret settings** (model IDs, knobs) |
| `requirements.txt` | Python deps |
## Secrets (Space β Settings β Variables and secrets)
| Secret | Purpose |
| ---------------- | -------------------------------------------------------- |
| `HF_TOKEN` | HF Inference Providers (uses your Pro quota) |
| `SERPER_API_KEY` | Web search via serper.dev |
That's it. No model IDs in secrets β edit `config.py` for those.
## Tuning
Open `config.py` and change values directly:
- `AGENT_MODEL_ID` β the LLM brain. Default DeepSeek-V3.
- `SELF_CONSISTENCY_N` β independent attempts per question. 3 = balanced, 5 = max.
- `MAX_STEPS` β agent reasoning steps per attempt.
- `VLM_MODEL_ID` β vision model for image questions.
Any of the constants in `config.py` can also be overridden by a Space env var
of the same name, but that's optional.
|