Spaces:
Sleeping
Sleeping
File size: 1,301 Bytes
0128def e3d7fcc 0128def 3ce50c4 e0cc0af e8d4494 e3d7fcc 0128def 7cb4919 f5d0a6f 7cb4919 b08871e 7cb4919 b08871e |
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 |
---
title: First Agent Template
emoji: ⚡
colorFrom: pink
colorTo: yellow
sdk: gradio
sdk_version: 5.15.0
app_file: app.py
pinned: false
tags:
- smolagents
- agent
- smolagent
- tool
- agent-course
---
## Installation
```bash
# Clone the repository
git clone https://huggingface.co/spaces/carloscapote/First_agent_template
# Create a Python virtual environment
python -m venv .venv
# Activate the new virtual environment
source .venv/bin/activate
# Install the dependencies
pip install -r requirements.txt
```
## Configuration
### Run locally agains a HuggingFace model
If you want to run this locally agains a model hosted by HuggingFace, you'll have to set up a [user access token](https://huggingface.co/docs/hub/security-tokens).
```bash
# Copy the `huggingface.env` as `.env`
cp huggingface.env .env
# Edit the file and set your `HF_TOKEN`
```
For additional configuration, check out HuggingFace's [spaces configuration reference](https://huggingface.co/docs/hub/spaces-config-reference).
### Run locally against a self-hosted Ollama model
```bash
# Copy the `ollama.env` as `.env`
cp ollama.env .env
# Edit the file and set your `OLLAMA_ENDPOINT` and `OLLAMA_MODEL`
```
### General settings
Set the value of `GRADIO_SHARE` to `true` if you want to share your Gradio application. |