Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,5 +8,84 @@ sdk_version: 6.3.0
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
+
---
|
| 12 |
+
title: Smolagents
|
| 13 |
+
emoji: 📚
|
| 14 |
+
colorFrom: indigo
|
| 15 |
+
colorTo: indigo
|
| 16 |
+
sdk: gradio
|
| 17 |
+
sdk_version: 6.3.0
|
| 18 |
+
app_file: app.py
|
| 19 |
+
pinned: false
|
| 20 |
+
---
|
| 21 |
+
# Alfred AI Assistant - smolagents Framework
|
| 22 |
+
|
| 23 |
+
A multi-functional AI assistant built with the **smolagents framework** that can:
|
| 24 |
+
- 🔍 Search the web for current information
|
| 25 |
+
- ⏰ Tell time in any timezone
|
| 26 |
+
- 🧮 Perform calculations and currency conversions
|
| 27 |
+
- 🌤️ Check weather anywhere
|
| 28 |
+
- 📏 Convert between units
|
| 29 |
+
- 🤖 List Hugging Face models
|
| 30 |
+
- 🎨 Generate images (optional)
|
| 31 |
+
|
| 32 |
+
## 🚀 Features
|
| 33 |
+
|
| 34 |
+
- **7+ Specialized Tools**: Each optimized for different tasks
|
| 35 |
+
- **Real-time Data**: Web search, weather, currency rates
|
| 36 |
+
- **Smart Tool Selection**: Agent automatically chooses the right tool
|
| 37 |
+
- **User-friendly Interface**: Clean Gradio UI
|
| 38 |
+
- **Educational**: Perfect for learning smolagents framework
|
| 39 |
+
|
| 40 |
+
## 📋 Available Tools
|
| 41 |
+
|
| 42 |
+
1. **web_search_tool** - Search DuckDuckGo for current information
|
| 43 |
+
2. **get_current_time_in_timezone** - Time in any timezone
|
| 44 |
+
3. **calculator_tool** - Math + currency conversion
|
| 45 |
+
4. **huggingface_models_tool** - List popular HF models
|
| 46 |
+
5. **weather_tool** - Current weather worldwide
|
| 47 |
+
6. **unit_conversion_tool** - Convert units (length, weight, temp, etc.)
|
| 48 |
+
7. **image_generation_tool** - Generate images from text
|
| 49 |
+
|
| 50 |
+
## 🎯 Example Queries
|
| 51 |
+
|
| 52 |
+
- "What are the latest AI news?"
|
| 53 |
+
- "What time is it in Tokyo?"
|
| 54 |
+
- "Calculate 15% of 250 + tax"
|
| 55 |
+
- "Convert 100 USD to EUR"
|
| 56 |
+
- "Weather in Paris"
|
| 57 |
+
- "10 km to miles"
|
| 58 |
+
- "List text-generation models on Hugging Face"
|
| 59 |
+
|
| 60 |
+
## 🛠️ Technical Details
|
| 61 |
+
|
| 62 |
+
- **Framework**: smolagents
|
| 63 |
+
- **LLM**: Qwen/Qwen2.5-Coder-32B-Instruct (via Hugging Face)
|
| 64 |
+
- **UI**: Gradio
|
| 65 |
+
- **Deployment**: Hugging Face Spaces
|
| 66 |
+
|
| 67 |
+
## 📁 Files
|
| 68 |
+
|
| 69 |
+
- `app.py` - Main application with agent and tools
|
| 70 |
+
- `prompts.yaml` - System prompts and configuration
|
| 71 |
+
- `requirements.txt` - Python dependencies
|
| 72 |
+
|
| 73 |
+
## 🚀 Deployment
|
| 74 |
+
|
| 75 |
+
1. Create a new Space on Hugging Face
|
| 76 |
+
2. Choose **Gradio** SDK
|
| 77 |
+
3. Upload all files
|
| 78 |
+
4. The Space will build automatically
|
| 79 |
+
|
| 80 |
+
## 📚 Course Context
|
| 81 |
+
|
| 82 |
+
This project is for **Unit 2: Frameworks for AI Agents** of the HuggingFace AI Agents Course, demonstrating the **smolagents framework**.
|
| 83 |
+
|
| 84 |
+
## ⚠️ Limitations
|
| 85 |
|
| 86 |
+
- Web search limited to 3 results (for speed)
|
| 87 |
+
- Some APIs have rate limits
|
| 88 |
+
- Image generation requires specific hardware
|
| 89 |
+
- Model may be overloaded during peak times
|
| 90 |
+
|
| 91 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|