Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -159,11 +159,9 @@ def unit_converter_tool(query: str) -> str:
|
|
| 159 |
|
| 160 |
HF_TOKEN = os.getenv("HUGGINGFACE_TOKEN", "")
|
| 161 |
|
| 162 |
-
# Using HfApiModel ensures the correct message format (list of dicts)
|
| 163 |
-
# Qwen-2.5-Coder is highly recommended for CodeAgent tool use
|
| 164 |
model = InferenceClientModel(
|
| 165 |
model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 166 |
-
token=HF_TOKEN
|
| 167 |
)
|
| 168 |
|
| 169 |
agent = CodeAgent(
|
|
@@ -188,7 +186,7 @@ def chat_with_agent(message, history):
|
|
| 188 |
demo = gr.ChatInterface(
|
| 189 |
fn=chat_with_agent,
|
| 190 |
title="🤖 Alfred AI Assistant",
|
| 191 |
-
description="I am Alfred, your tool-equipped assistant. I can search the web, calculate math, convert units,
|
| 192 |
examples=[
|
| 193 |
"What time is it in Tokyo?",
|
| 194 |
"Convert 150 pounds to kg",
|
|
|
|
| 159 |
|
| 160 |
HF_TOKEN = os.getenv("HUGGINGFACE_TOKEN", "")
|
| 161 |
|
|
|
|
|
|
|
| 162 |
model = InferenceClientModel(
|
| 163 |
model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 164 |
+
token=HF_TOKEN
|
| 165 |
)
|
| 166 |
|
| 167 |
agent = CodeAgent(
|
|
|
|
| 186 |
demo = gr.ChatInterface(
|
| 187 |
fn=chat_with_agent,
|
| 188 |
title="🤖 Alfred AI Assistant",
|
| 189 |
+
description="I am Alfred, your tool-equipped assistant. I can search the web, calculate math, convert units, check the time, check the weather and translate the languages!",
|
| 190 |
examples=[
|
| 191 |
"What time is it in Tokyo?",
|
| 192 |
"Convert 150 pounds to kg",
|