david-thrower's picture
Update app.py
ab1c97c verified
raw
history blame
842 Bytes
from smolagents import (
TransformersModel,
# load_tool,
DuckDuckGoSearchTool,
# ApiWebSearchTool,
VisitWebpageTool,
# WebSearchTool,
WikipediaSearchTool,
PythonInterpreterTool,
UserInputTool,
FinalAnswerTool,
CodeAgent,
InferenceClientModel,
GradioUI
)
MODEL_NAME = "Qwen/Qwen3-0.6B"
model = TransformersModel(
model_id=MODEL_NAME,
max_new_tokens=4096,
temperature=0.6,
top_p=0.95,
repetition_penalty=1.1)
agent = CodeAgent(
tools=[ DuckDuckGoSearchTool(),
# ApiWebSearchTool(),
VisitWebpageTool(),
# WebSearchTool(),
WikipediaSearchTool(),
PythonInterpreterTool(),
UserInputTool(),
FinalAnswerTool()
],
model=model,
)
GradioUI(agent).launch()