Views
No views yet
smolagents.| Piece | What it does |
|---|---|
CodeAgent | Writes short Python actions to call tools |
InferenceClientModel | Free Hub inference (Qwen/Qwen2.5-Coder-32B-Instruct) |
| Tools | Web search, visit webpage, calculator, text summarizer |
| Gradio UI | Chat tab + Unit 4 certificate evaluation / submit tab |
submit_answers.py | Local CLI that submits scores without needing a Space |
Note on model class names: older tutorials mentionedHuggingFaceHubServerModel/HfApiModel.
In currentsmolagents, that Hub backend is calledInferenceClientModel.
Important (2026): Creating new Gradio Spaces on Hugging Face now requires a PRO plan (or an eligible older account for ZeroGPU).
If you cannot create a Space, use the local runner below — it still submits to the official Unit 4 leaderboard.
submit_answers.py).HF_TOKEN)HF_TOKEN = your token from https://huggingface.co/settings/tokens..env.example → .env and paste:HF_TOKEN=hf_your_token_herehf auth loginpython -m venv .venv.venv\Scripts\Activate.ps1source .venv/bin/activatepip install -r requirements.txtpython app.pypython submit_answers.pyhttp://127.0.0.1:7860) when using app.py.app.py, requirements.txt, and README.md.HF_TOKEN.hf upload YOUR_USERNAME/YOUR_SPACE_NAME . --repo-type spacehf-agents-course-final/
├── app.py # Agent + Gradio UI (chat + certificate submit)
├── submit_answers.py # Local leaderboard submission (no Space needed)
├── requirements.txt # Python packages
├── README.md # This file
├── .env.example # Template for local HF_TOKEN
└── .gitignore