Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,8 +12,9 @@ import pandas as pd
|
|
| 12 |
# from langchain_community.chat_models import ChatHuggingFace
|
| 13 |
# from langchain.llms.base import LLM
|
| 14 |
# from huggingface_hub import InferenceClient
|
|
|
|
| 15 |
from smolagents import ToolCallingAgent, DuckDuckGoSearchTool, InferenceClientModel, tool
|
| 16 |
-
|
| 17 |
|
| 18 |
# (Keep Constants as is)
|
| 19 |
# --- Constants ---
|
|
@@ -68,15 +69,8 @@ class BasicAgent:
|
|
| 68 |
"If a question asks for a count, return only the number."
|
| 69 |
)
|
| 70 |
|
| 71 |
-
# # Register Excel tool
|
| 72 |
-
# read_excel = Tool(
|
| 73 |
-
# name="read_excel",
|
| 74 |
-
# func=read_excel_tool,
|
| 75 |
-
# description="Reads Excel or CSV file and returns the first 10 rows as a string."
|
| 76 |
-
# )
|
| 77 |
-
|
| 78 |
model = InferenceClientModel(
|
| 79 |
-
model_id="gpt-4o",
|
| 80 |
token=openaikey,
|
| 81 |
provider="openai"#,
|
| 82 |
# temperature=0.0 # 0.7 by default (not sure)
|
|
|
|
| 12 |
# from langchain_community.chat_models import ChatHuggingFace
|
| 13 |
# from langchain.llms.base import LLM
|
| 14 |
# from huggingface_hub import InferenceClient
|
| 15 |
+
# from smolagents.tools import Tool
|
| 16 |
from smolagents import ToolCallingAgent, DuckDuckGoSearchTool, InferenceClientModel, tool
|
| 17 |
+
|
| 18 |
|
| 19 |
# (Keep Constants as is)
|
| 20 |
# --- Constants ---
|
|
|
|
| 69 |
"If a question asks for a count, return only the number."
|
| 70 |
)
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
model = InferenceClientModel(
|
| 73 |
+
model_id="gpt-4o-mini",
|
| 74 |
token=openaikey,
|
| 75 |
provider="openai"#,
|
| 76 |
# temperature=0.0 # 0.7 by default (not sure)
|