Add hf_token and use as arg to instantiate model
Browse files
app.py
CHANGED
|
@@ -9,7 +9,9 @@ from smolagents import CodeAgent, HfApiModel
|
|
| 9 |
# --- Constants ---
|
| 10 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
| 13 |
|
| 14 |
tools = []
|
| 15 |
|
|
|
|
| 9 |
# --- Constants ---
|
| 10 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 11 |
|
| 12 |
+
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 13 |
+
model = HfApiModel(api_key=HF_TOKEN)
|
| 14 |
+
|
| 15 |
|
| 16 |
tools = []
|
| 17 |
|