Spaces:
Sleeping
Sleeping
File size: 2,758 Bytes
2705160 62ad9da 2705160 d123508 8b88400 2705160 30f65f8 2b4218b 5e565cc 2b4218b 5e565cc 4bc4029 1d0aa9c 5e565cc e0e459a 30f65f8 e0e459a 30f65f8 e0e459a 4bc4029 2b4218b 30f65f8 2b4218b 30f65f8 2b4218b 62ad9da |
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
---
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
short_description: Agent for GAIA Evaluation
---
# π§ Agent for GAIA Evaluation
This project contains a Gemini-powered CodeAgent built with [smolagents](https://github.com/smol-ai/smol-agents) for use
in the **GAIA Unit 4 Evaluation** of the [Hugging Face Course](https://hf.co/learn/agents-course/unit0/introduction).
> π§βπ« This app is part of the **Hugging Face Courses** series and was developed as an educational project to showcase how machine
> learning can be used in real-world event scenarios. Learn more at [Hugging Face Courses](https://huggingface.co/learn).
---
### π Folder Structure
```
Template Final Assignment_app/
β
βββ app.py # Main app with Gradio UI and agent execution logic.
βββ gaia_tools # Custom tools including RunPythonFileTool and download_server.
βββ .env.template # Environment variables template /Template file showing expected environment variables (e.g., API keys).
βββ requirements.txt # Python dependencies.
βββ README.md # Project overview, setup instructions, usage examples.
```
## π Features
* Uses the **Gemini 2.0 Flash** model via `LiteLLMModel`
* Equipped with essential tools:
* `DuckDuckGoSearchTool` for quick lookups
* `RunPythonFileTool` for executing `.py` scripts
* `ReverseTextTool` for decoding reversed questions
* `download_server` for fetching files from URLs
* Base tools (math, string manipulation, etc.)
## π Evaluation Strategy
The agent reads questions from the GAIA evaluation endpoint, applies reasoning using a system prompt with strict
guidelines, and submits answers back for scoring.
## π οΈ Setup
1. Clone this repository or Space
2. Set your environment variables:
```
GEMINI_API_KEY=your_api_key_here
SPACE_ID=your_hf_space_id
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
4. Run locally:
```bash
python app.py
```
Or launch directly via [Hugging Face Spaces](https://huggingface.co/spaces/).
## π§ͺ Evaluation Flow
1. Log in to Hugging Face through the UI
2. Click βRun Evaluation & Submit All Answersβ
3. The agent will fetch tasks, solve them, and submit results
---
## π€ Contributing
We welcome contributions to improve GalaGuide!
1. Fork the repository
2. Create a new branch:
```bash
git checkout -b feature-xyz
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference |