Sebastian Reinhard commited on
Commit
ec07723
·
1 Parent(s): a0f5a69

first commit

Browse files
Files changed (1) hide show
  1. README.md +76 -17
README.md CHANGED
@@ -1,26 +1,85 @@
1
  ---
 
2
  title: GAIA Agent Space
3
- emoji: 🔥
4
  colorFrom: indigo
5
  colorTo: red
6
  sdk: gradio
7
- sdk_version: 5.29.0
8
- app_file: app.py
9
  pinned: false
10
  license: mit
11
- short_description: Agent for the GAIA challenge
12
- =======
13
- title: Template Final Assignment
14
- emoji: 🕵🏻‍♂️
15
- colorFrom: indigo
16
- colorTo: indigo
17
- sdk: gradio
18
- sdk_version: 5.25.2
19
- app_file: app.py
20
- pinned: false
21
- hf_oauth: true
22
- # optional, default duration is 8 hours/480 minutes. Max duration is 30 days/43200 minutes.
23
- hf_oauth_expiration_minutes: 480
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  ---
25
 
26
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
1
  ---
2
+
3
  title: GAIA Agent Space
4
+ emoji: "🔥"
5
  colorFrom: indigo
6
  colorTo: red
7
  sdk: gradio
8
+ sdk\_version: 5.29.0
9
+ app\_file: app.py
10
  pinned: false
11
  license: mit
12
+
13
+ # Uncomment the two lines below if you want to protect the Space with Hugging Face OAuth.
14
+
15
+ # hf\_oauth: true
16
+
17
+ # hf\_oauth\_expiration\_minutes: 480
18
+
19
+ ---
20
+
21
+ # GAIA Agent Space
22
+
23
+ A reproduction‑ready **Retrieval‑Augmented Generation (RAG) agent** built with **LangChain** and **Gradio** for the [GAIA benchmark](https://arxiv.org/abs/2311.12983). The Space exposes both an interactive web UI *and* a programmatic `/predict` endpoint, making it easy to test single GAIA tasks or to batch‑evaluate whole splits with the Inspect‑AI runner.
24
+
25
+ ## ✨ Demo
26
+
27
+ > Click **<Run>** above ⬆️ and paste a GAIA JSON task – or just try something like:
28
+ >
29
+ > ```json
30
+ > {"question": "How many studio albums were published by Mercedes Sosa between 2000 and 2009 (included)?"}
31
+ > ```
32
+
33
+ The agent decides which tool chain to invoke (Wikipedia search, table parser, etc.) and returns the numeric answer in the GAIA `SUBMIT:` format.
34
+
35
+ ## 🚀 Quick start (local)
36
+
37
+ ```bash
38
+ # 1 ‑ clone
39
+ git clone https://huggingface.co/spaces/Acecross/GAIA_agent_space
40
+ cd GAIA_agent_space
41
+
42
+ # 2 ‑ create env
43
+ conda env create -f environment.yml # or: python -m venv .venv && pip install -r requirements.txt
44
+ conda activate gaia‑agent
45
+
46
+ # 3 ‑ run UI
47
+ python app.py # Gradio launches at http://127.0.0.1:7860
48
+ ```
49
+
50
+ ## 🛠️  Environment variables
51
+
52
+ | Variable | Purpose |
53
+ | ---------------- | ----------------------------------------------------------------------------------------------- |
54
+ | `HF_API_TOKEN` | *Optional* – needed only if you hit the Hugging Face Inference API or gated models. |
55
+ | `OPENAI_API_KEY` | *Optional* – set to use OpenAI models for LLM or vision tasks. |
56
+ | `TAVILY_API_KEY` | API key for web search (used by the `TavilySearchTool`). |
57
+ | `STOCKFISH_PATH` | Path to the Stockfish binary for chess‑position questions (defaults to `stockfish` in `$PATH`). |
58
+
59
+ Create a `.env` file with any keys you need; `app.py` loads it on start‑up.
60
+
61
+ ## 📁 Project layout
62
+
63
+ ```
64
+ ├─ app.py # Gradio interface + agent bootstrap
65
+ ├─ agent/
66
+ │ ├─ chains.py # LangChain boiler plate (router, retriever, etc.)
67
+ │ ├─ tools/ # Custom tool classes (spreadsheet, chess, video counter…)
68
+ │  └─ prompts/
69
+ ├─ requirements.txt # runtime deps
70
+ └─ environment.yml # conda lock (optional)
71
+ ```
72
+
73
+ ## 📝 License
74
+
75
+ This project is released under the **MIT License** – see [`LICENSE`](./LICENSE) for details.
76
+
77
  ---
78
 
79
+ ### 🔗 Useful links
80
+
81
+ * GAIA paper: [https://arxiv.org/abs/2311.12983](https://arxiv.org/abs/2311.12983)
82
+ * LangChain docs: [https://python.langchain.com](https://python.langchain.com)
83
+ * Hugging Face Spaces: [https://huggingface.co/docs/hub/spaces](https://huggingface.co/docs/hub/spaces)
84
+
85
+ Feel free to open an issue or a pull request if you spot a bug or want to add a new GAIA‑specific tool! 🎉