Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,16 +2,14 @@ import os
|
|
| 2 |
import gradio as gr
|
| 3 |
import requests
|
| 4 |
import pandas as pd
|
| 5 |
-
from smolagents import CodeAgent, DuckDuckGoSearchTool,
|
| 6 |
|
| 7 |
def create_agent():
|
| 8 |
-
#
|
| 9 |
-
model =
|
| 10 |
|
| 11 |
-
# We give it the search tool so it can find answers on the web 🔍
|
| 12 |
search_tool = DuckDuckGoSearchTool()
|
| 13 |
|
| 14 |
-
# The CodeAgent can write Python to solve complex problems 🐍
|
| 15 |
agent = CodeAgent(
|
| 16 |
tools=[search_tool],
|
| 17 |
model=model,
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
import requests
|
| 4 |
import pandas as pd
|
| 5 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfEngine
|
| 6 |
|
| 7 |
def create_agent():
|
| 8 |
+
# Use Hugging Face Inference API
|
| 9 |
+
model = HfEngine(model_id="Qwen/Qwen2.5-Coder-32B-Instruct")
|
| 10 |
|
|
|
|
| 11 |
search_tool = DuckDuckGoSearchTool()
|
| 12 |
|
|
|
|
| 13 |
agent = CodeAgent(
|
| 14 |
tools=[search_tool],
|
| 15 |
model=model,
|