Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: "First_agent_template"
|
| 3 |
+
emoji: "π€"
|
| 4 |
+
colorFrom: "pink"
|
| 5 |
+
colorTo: "yellow"
|
| 6 |
+
sdk: "gradio"
|
| 7 |
+
app_file: "app.py"
|
| 8 |
+
license: "mit"
|
| 9 |
+
short_description: "GAIA Unit 4 agent for the Hugging Face Agents Course."
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# First Agent Template β GAIA Unit 4
|
| 13 |
+
|
| 14 |
+
This Space contains my final project agent for the **Hugging Face Agents Course** (Unit 4 β GAIA benchmark).
|
| 15 |
+
|
| 16 |
+
The goal of this Space is to:
|
| 17 |
+
|
| 18 |
+
- Fetch a set of filtered **GAIA level-1 questions** from the course API
|
| 19 |
+
- Use a custom **agent** (`agent.py`) to answer each question
|
| 20 |
+
- Submit the answers to the `/submit` endpoint and obtain a **score**
|
| 21 |
+
- Reach **β₯ 30% accuracy** to qualify for the course certificate
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## Files
|
| 26 |
+
|
| 27 |
+
- `app.py` β Gradio application that:
|
| 28 |
+
- calls `GET /questions`
|
| 29 |
+
- runs the agent on all questions
|
| 30 |
+
- sends the payload `{ username, agent_code, answers }` to `POST /submit`
|
| 31 |
+
- `agent.py` β implementation of the agent (LLM + simple retrieval and reasoning)
|
| 32 |
+
- `prompts.yaml` β prompt templates used by the agent
|
| 33 |
+
- `requirements.txt` β Python dependencies for the Space
|
| 34 |
+
- `tools/` β additional helper tools if needed
|
| 35 |
+
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
## How to use this Space
|
| 39 |
+
|
| 40 |
+
1. Make sure the Space is **public**.
|
| 41 |
+
2. Open the Space UI.
|
| 42 |
+
3. Enter:
|
| 43 |
+
- your **Hugging Face username**
|
| 44 |
+
- the public link to your Space code
|
| 45 |
+
e.g. `https://huggingface.co/spaces/akhilamacherla0987/First_agent_template/tree/main`
|
| 46 |
+
4. Click **βRun agent & Submitβ**.
|
| 47 |
+
5. The API response will show your **score** and whether you reached the required 30%.
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## Local development (optional)
|
| 52 |
+
|
| 53 |
+
```bash
|
| 54 |
+
pip install -r requirements.txt
|
| 55 |
+
python app.py
|