Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,7 @@ from tools import (
|
|
| 13 |
)
|
| 14 |
from smolagents import GradioUI, CodeAgent, HfApiModel, PythonInterpreterTool
|
| 15 |
from functools import lru_cache
|
|
|
|
| 16 |
|
| 17 |
# (Keep Constants as is)
|
| 18 |
# --- Constants ---
|
|
@@ -41,6 +42,7 @@ class BasicAgent:
|
|
| 41 |
self.wiki_url_tool = Find_wikipedia_URL()
|
| 42 |
self.audio_tool = audio_or_mp3__interpreter()
|
| 43 |
self.model = get_hf_model()
|
|
|
|
| 44 |
|
| 45 |
# Initialize CodeAgent only once
|
| 46 |
self.alfred = CodeAgent(
|
|
@@ -52,6 +54,7 @@ class BasicAgent:
|
|
| 52 |
self.multimodal_tool,
|
| 53 |
self.python_code_tool,
|
| 54 |
self.audio_tool,
|
|
|
|
| 55 |
],
|
| 56 |
model=self.model,
|
| 57 |
add_base_tools=True,
|
|
|
|
| 13 |
)
|
| 14 |
from smolagents import GradioUI, CodeAgent, HfApiModel, PythonInterpreterTool
|
| 15 |
from functools import lru_cache
|
| 16 |
+
from retriever import VegetableInfoRetrieverTool
|
| 17 |
|
| 18 |
# (Keep Constants as is)
|
| 19 |
# --- Constants ---
|
|
|
|
| 42 |
self.wiki_url_tool = Find_wikipedia_URL()
|
| 43 |
self.audio_tool = audio_or_mp3__interpreter()
|
| 44 |
self.model = get_hf_model()
|
| 45 |
+
self.vegetable_info_retriever=VegetableInfoRetrieverTool()
|
| 46 |
|
| 47 |
# Initialize CodeAgent only once
|
| 48 |
self.alfred = CodeAgent(
|
|
|
|
| 54 |
self.multimodal_tool,
|
| 55 |
self.python_code_tool,
|
| 56 |
self.audio_tool,
|
| 57 |
+
self.vegetable_info_retriever,
|
| 58 |
],
|
| 59 |
model=self.model,
|
| 60 |
add_base_tools=True,
|