Raj
Upload 6 files
08fe068 verified
|
Raw
History Blame Contribute Delete
1.97 kB

A newer version of the Gradio SDK is available: 6.19.0

Upgrade
metadata
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.