Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
from smolagents import CodeAgent, DuckDuckGoSearchTool, load_tool, tool
|
| 2 |
-
from smolagents.models import
|
| 3 |
|
| 4 |
from tools.final_answer import FinalAnswerTool
|
| 5 |
from Gradio_UI import GradioUI
|
|
@@ -38,13 +38,13 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 38 |
# --- Load Inference Model ---
|
| 39 |
final_answer = FinalAnswerTool()
|
| 40 |
|
| 41 |
-
model =
|
|
|
|
| 42 |
max_tokens=2096,
|
| 43 |
temperature=0.5,
|
| 44 |
-
model_id='Qwen/Qwen3-Coder-30B-A3B-Instruct', # You are using this model
|
| 45 |
-
custom_role_conversions=None,
|
| 46 |
)
|
| 47 |
|
|
|
|
| 48 |
# --- Load System Prompts ---
|
| 49 |
with open("prompts.yaml", 'r') as stream:
|
| 50 |
prompt_templates = yaml.safe_load(stream)
|
|
|
|
| 1 |
from smolagents import CodeAgent, DuckDuckGoSearchTool, load_tool, tool
|
| 2 |
+
from smolagents.models.inference_client import InferenceClient
|
| 3 |
|
| 4 |
from tools.final_answer import FinalAnswerTool
|
| 5 |
from Gradio_UI import GradioUI
|
|
|
|
| 38 |
# --- Load Inference Model ---
|
| 39 |
final_answer = FinalAnswerTool()
|
| 40 |
|
| 41 |
+
model = InferenceClient(
|
| 42 |
+
model_id='Qwen/Qwen3-Coder-30B-A3B-Instruct',
|
| 43 |
max_tokens=2096,
|
| 44 |
temperature=0.5,
|
|
|
|
|
|
|
| 45 |
)
|
| 46 |
|
| 47 |
+
|
| 48 |
# --- Load System Prompts ---
|
| 49 |
with open("prompts.yaml", 'r') as stream:
|
| 50 |
prompt_templates = yaml.safe_load(stream)
|