M.Natale commited on
Commit ·
d50646f
1
Parent(s): f4b6523
update app.py
Browse files- app.py +3 -6
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -2,22 +2,19 @@ import os
|
|
| 2 |
import gradio as gr
|
| 3 |
import requests
|
| 4 |
import pandas as pd
|
| 5 |
-
from smolagents import DuckDuckGoSearchTool, CodeAgent, WikipediaSearchTool,
|
| 6 |
|
| 7 |
# (Keep Constants as is)
|
| 8 |
# --- Constants ---
|
| 9 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 10 |
-
|
| 11 |
-
temperature=0.5,
|
| 12 |
-
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 13 |
-
custom_role_conversions=None)
|
| 14 |
|
| 15 |
# --- Basic Agent Definition ---
|
| 16 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 17 |
class BasicAgent:
|
| 18 |
def __init__(self):
|
| 19 |
self.agent = CodeAgent(
|
| 20 |
-
model=
|
| 21 |
tools=[DuckDuckGoSearchTool(), WikipediaSearchTool()],
|
| 22 |
add_base_tools=True,
|
| 23 |
)
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
import requests
|
| 4 |
import pandas as pd
|
| 5 |
+
from smolagents import DuckDuckGoSearchTool, CodeAgent, WikipediaSearchTool, InferenceClientModel
|
| 6 |
|
| 7 |
# (Keep Constants as is)
|
| 8 |
# --- Constants ---
|
| 9 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 10 |
+
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
# --- Basic Agent Definition ---
|
| 13 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 14 |
class BasicAgent:
|
| 15 |
def __init__(self):
|
| 16 |
self.agent = CodeAgent(
|
| 17 |
+
model= InferenceClientModel(),
|
| 18 |
tools=[DuckDuckGoSearchTool(), WikipediaSearchTool()],
|
| 19 |
add_base_tools=True,
|
| 20 |
)
|
requirements.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
gradio
|
| 2 |
requests
|
| 3 |
-
smolagents
|
| 4 |
ddgs
|
| 5 |
transformers
|
| 6 |
wikipedia-api
|
|
|
|
| 1 |
gradio
|
| 2 |
requests
|
| 3 |
+
smolagents
|
| 4 |
ddgs
|
| 5 |
transformers
|
| 6 |
wikipedia-api
|