Spaces:
Sleeping
Sleeping
Update app.py
Browse filesAdded API key on the code
app.py
CHANGED
|
@@ -7,6 +7,9 @@ from tools.final_answer import FinalAnswerTool
|
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
|
|
|
|
|
|
|
|
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
def suggest_clothing(city: str, temperature: int) -> str:
|
|
@@ -49,7 +52,9 @@ model = HfApiModel(
|
|
| 49 |
max_tokens=2096,
|
| 50 |
temperature=0.5,
|
| 51 |
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
|
|
|
| 52 |
custom_role_conversions=None,
|
|
|
|
| 53 |
)
|
| 54 |
|
| 55 |
|
|
|
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
+
# Retrieve Hugging Face API key
|
| 11 |
+
hf_api_key = os.getenv("HF_API_KEY")
|
| 12 |
+
|
| 13 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 14 |
@tool
|
| 15 |
def suggest_clothing(city: str, temperature: int) -> str:
|
|
|
|
| 52 |
max_tokens=2096,
|
| 53 |
temperature=0.5,
|
| 54 |
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 55 |
+
token=hf_api_key,
|
| 56 |
custom_role_conversions=None,
|
| 57 |
+
|
| 58 |
)
|
| 59 |
|
| 60 |
|