CoolFace
Apppublic

frsswq/Final_Assignment_Template

sourceHugging Faceupdated 23d agoView on Hugging Face
0likes
App README

GAIA Final Assignment Agent (HF Agents Course — Unit 4)

Agent built on the low-cost Gemini 2.5 Flash-Lite model through OpenRouter that answers the 20 GAIA level-1 questions from the course scoring API.

Architecture

  • agent.pyGaiaAgent: OpenRouter chat completions with Gemini 2.5 Flash-Lite, OpenRouter web search for research questions, and multimodal input for attachments (PNG/MP3 as base64, YouTube links as video URLs, XLSX converted to a markdown table, .py inlined as text). Answers follow GAIA exact-match formatting rules and are extracted from a final ANSWER: line.
  • run_local.py — runs the agent over all questions from GET /questions, caching results incrementally to answers.json (retries only on technical failure).
  • app.py — the original Gradio submission app from the course template (kept for reference; Gradio hosting on free Spaces is no longer available, so answers were generated locally with run_local.py and submitted to POST /submit).
  • answers.json — the agent's cached answers, exactly as submitted.

Configuration

Set OPENROUTER_API_KEY in the environment or a local gitignored .env file. The model can be changed with OPENROUTER_MODEL; it defaults to google/gemini-2.5-flash-lite.

Note: the course API GET /files/{task_id} endpoint was returning 404 for all attachments at the time of the run; the 5 attachment files were fetched from a public mirror instead and fed to the same pipeline.