File size: 1,587 Bytes
2705160
 
62ad9da
 
 
2705160
 
 
 
d123508
 
 
2705160
 
b22ac70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
07fb471
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
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
# optional, default duration is 8 hours/480 minutes. Max duration is 30 days/43200 minutes.
hf_oauth_expiration_minutes: 480
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

## Local Setup

Install dependencies and run the smoke checks with `uv`:

```bash
uv sync
uv run pytest
uv run python scripts/run_one.py
```

Copy `.env.example` to `.env` and set the LiteLLM model you want to test:

```env
LITELLM_MODEL=anthropic/claude-3-5-sonnet-latest
ANTHROPIC_API_KEY=...
```

LiteLLM can also route OpenAI-compatible models through the same code path:

```env
LITELLM_MODEL=openai/gpt-4o-mini
OPENAI_API_KEY=...
```

If you run a LiteLLM proxy, set `LITELLM_API_BASE` and `LITELLM_API_KEY`.

## Agent V1

The agent uses a routed LangGraph flow:

```text
ingest_task -> classify_task -> specialized solver -> verify_answer -> normalize_final_answer
```

Routes cover direct reasoning, computation/table questions, web search, YouTube
transcripts, spreadsheets, Python files, audio files, and image files.

For audio questions, configure a LiteLLM transcription-compatible provider. By
default the code uses `AUDIO_TRANSCRIPTION_MODEL=whisper-1` and reads
`OPENAI_API_KEY`, or you can set:

```env
AUDIO_TRANSCRIPTION_MODEL=whisper-1
AUDIO_TRANSCRIPTION_API_KEY=...
AUDIO_TRANSCRIPTION_API_BASE=...
```

For image questions, use a vision-capable `LITELLM_MODEL`.