File size: 1,308 Bytes
2705160 62ad9da 2705160 d123508 2705160 8e5831a |
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 |
---
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
# Modular Agent Evaluation Template
This project provides a modular, production-ready template for evaluating agents using the Hugging Face Unit 4 Evaluation API.
## Architecture
- `app.py`: Gradio UI and orchestration
- `agent.py`: Agent logic (extend `BaseAgent`)
- `api.py`: API interaction and error handling
- `requirements.txt`: Dependencies
## Setup
```bash
pip install -r requirements.txt
python app.py
```
## Usage
1. Log in with your Hugging Face account in the UI.
2. Click "Run Evaluation & Submit All Answers" to evaluate and submit.
3. Extend `agent.py` to implement your own agent logic.
## Extending the Agent
- Edit `agent.py` and subclass `BaseAgent`.
- Implement the `__call__` method to generate answers for questions.
## Troubleshooting
- Ensure all dependencies are installed.
- Check API availability and network connection.
- Review error messages in the UI for guidance. |