Update app.py
Browse files
app.py
CHANGED
|
@@ -9,12 +9,13 @@ from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, Py
|
|
| 9 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 10 |
|
| 11 |
# --- Hugging Face API Key ---
|
| 12 |
-
HF_API_KEY = "
|
| 13 |
|
| 14 |
# --- Initialize Hugging Face Model ---
|
| 15 |
model = InferenceClientModel(
|
| 16 |
model_id="google/embeddinggemma-300m", # example HF chat model
|
| 17 |
token=HF_API_KEY
|
|
|
|
| 18 |
)
|
| 19 |
|
| 20 |
# --- Basic Agent Definition ---
|
|
|
|
| 9 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 10 |
|
| 11 |
# --- Hugging Face API Key ---
|
| 12 |
+
HF_API_KEY = os.environ["HF_TOKEN"]
|
| 13 |
|
| 14 |
# --- Initialize Hugging Face Model ---
|
| 15 |
model = InferenceClientModel(
|
| 16 |
model_id="google/embeddinggemma-300m", # example HF chat model
|
| 17 |
token=HF_API_KEY
|
| 18 |
+
HF_API_URL = f"https://api-inference.huggingface.co/models/{google/embeddinggemma-300m}"
|
| 19 |
)
|
| 20 |
|
| 21 |
# --- Basic Agent Definition ---
|