Spaces:
Sleeping
Sleeping
| 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. |