Spaces:
Sleeping
Sleeping
File size: 2,951 Bytes
2705160 315f4fc 62ad9da 2705160 d123508 2705160 315f4fc |
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 |
---
title: JarvisAgent for GAIA Benchmark
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
---
# π GAIA Solver Agent - Optimized & Production Ready
A highly optimized AI agent for the GAIA benchmark with robust error handling, parallel processing, and graceful API key management.
## β¨ Key Features
### π **Performance Optimizations**
- **β‘ Parallel Processing**: Process multiple questions concurrently using ThreadPoolExecutor
- **πΎ Smart Caching**: File-based JSON cache to avoid reprocessing questions
- **π Async Operations**: Non-blocking UI with real-time progress updates
- **π¦ Batch Processing**: Questions processed in configurable batches for optimal performance
### π‘οΈ **Robust Error Handling**
- **π§ Graceful API Key Management**: Works with or without API keys
- **π Smart Fallbacks**: Automatic fallback to free alternatives (DuckDuckGo vs Google Search)
- **π‘οΈ Error Recovery**: Individual question failures don't stop the entire process
- **π Comprehensive Logging**: Detailed status updates and error reporting
### π§° **Enhanced Tools**
- **π Google Search** (with DuckDuckGo fallback)
- **π Math Solver** (SymPy-based calculations)
- **βοΈ Text Preprocesser** (with enhanced reversal handling)
- **π Wikipedia Access** (title finder + content fetcher)
- **π File Analysis** (Gemini-powered document processing)
- **π₯ Video Analysis** (YouTube/video content analysis)
- **π§© Riddle Solver** (pattern analysis for logic puzzles)
- **π Web Page Fetcher** (HTML to markdown conversion)
## π§ Quick Start
### 1. **Installation**
```bash
git clone <your-repo>
cd GAIA-Solver-Agent
pip install -r requirements.txt
```
### 2. **Run the Agent**
```bash
python app.py
```
## π API Key Setup
### **Required for Full Functionality**
#### **Google/Gemini API (Recommended)**
```bash
# Get your key: https://makersuite.google.com/app/apikey
export GOOGLE_API_KEY="your_key_here"
export GEMINI_API_KEY="your_key_here" # Can be same as GOOGLE_API_KEY
```
#### **Google Custom Search (Optional)**
```bash
# Get search key: https://developers.google.com/custom-search/v1/introduction
# Create search engine: https://programmablesearchengine.google.com/
export GOOGLE_SEARCH_API_KEY="your_search_key"
export GOOGLE_SEARCH_ENGINE_ID="your_engine_id"
```
### **Graceful Fallbacks**
| Feature | With API Key | Without API Key |
|---------|-------------|-----------------|
| **Web Search** | Google Custom Search | DuckDuckGo (free) |
| **File Analysis** | Gemini-powered | Error message with setup guide |
| **Video Analysis** | Gemini-powered | Error message with setup guide |
| **Math/Text/Wikipedia** | β
Always available | β
Always available |
--- |