Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ import pandas as pd
|
|
| 7 |
# Import our custom tools from their modules
|
| 8 |
from huggingface_hub import login
|
| 9 |
from smolagents import CodeAgent, InferenceClientModel, OpenAIServerModel
|
| 10 |
-
from tools import web_search, visit_webpage, final_answer,
|
| 11 |
# from tools import web_search, visit_webpage, final_answer, go_back, close_popups, search_item_ctrl_f
|
| 12 |
from retriever import load_guest_dataset
|
| 13 |
from functools import lru_cache
|
|
@@ -35,8 +35,6 @@ class BasicAgent:
|
|
| 35 |
|
| 36 |
self.final_answer = final_answer
|
| 37 |
|
| 38 |
-
self.speech_to_text = speech_to_text
|
| 39 |
-
|
| 40 |
self.wiki_search = wiki_search
|
| 41 |
|
| 42 |
# self.go_back = go_back
|
|
@@ -74,7 +72,7 @@ class BasicAgent:
|
|
| 74 |
|
| 75 |
# Create the agent with tools
|
| 76 |
self.agent = CodeAgent(
|
| 77 |
-
tools=[web_search, self.visit_webpage, self.final_answer, wiki_search
|
| 78 |
# tools=[self.web_search, self.visit_webpage, self.final_answer, go_back, close_popups, search_item_ctrl_f],
|
| 79 |
model=self.model,
|
| 80 |
additional_authorized_imports=["pandas", "openpyxl", "yt_dlp", "requests", "io", "json", "whisper", "bs4"],
|
|
|
|
| 7 |
# Import our custom tools from their modules
|
| 8 |
from huggingface_hub import login
|
| 9 |
from smolagents import CodeAgent, InferenceClientModel, OpenAIServerModel
|
| 10 |
+
from tools import web_search, visit_webpage, final_answer, wiki_search
|
| 11 |
# from tools import web_search, visit_webpage, final_answer, go_back, close_popups, search_item_ctrl_f
|
| 12 |
from retriever import load_guest_dataset
|
| 13 |
from functools import lru_cache
|
|
|
|
| 35 |
|
| 36 |
self.final_answer = final_answer
|
| 37 |
|
|
|
|
|
|
|
| 38 |
self.wiki_search = wiki_search
|
| 39 |
|
| 40 |
# self.go_back = go_back
|
|
|
|
| 72 |
|
| 73 |
# Create the agent with tools
|
| 74 |
self.agent = CodeAgent(
|
| 75 |
+
tools=[web_search, self.visit_webpage, self.final_answer, wiki_search],
|
| 76 |
# tools=[self.web_search, self.visit_webpage, self.final_answer, go_back, close_popups, search_item_ctrl_f],
|
| 77 |
model=self.model,
|
| 78 |
additional_authorized_imports=["pandas", "openpyxl", "yt_dlp", "requests", "io", "json", "whisper", "bs4"],
|