Commit ·
ec60faf
1
Parent(s): c0a5395
image_qa and google (#4)
Browse files- image_qa and google (1d4999158879b9decb8dbc282c82e33725fc6e53)
tools.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import DuckDuckGoSearchTool, VisitWebpageTool, FinalAnswerTool
|
| 2 |
from smolagents import Tool, tool
|
| 3 |
import random
|
| 4 |
from huggingface_hub import list_models
|
|
@@ -9,12 +9,15 @@ from io import BytesIO
|
|
| 9 |
|
| 10 |
|
| 11 |
# Initialize the DuckDuckGo search tool
|
| 12 |
-
web_search =
|
|
|
|
| 13 |
|
| 14 |
visit_webpage = VisitWebpageTool()
|
| 15 |
|
| 16 |
final_answer = FinalAnswerTool()
|
| 17 |
|
|
|
|
|
|
|
| 18 |
|
| 19 |
class WeatherInfoTool(Tool):
|
| 20 |
name = "weather_info"
|
|
|
|
| 1 |
+
from smolagents import DuckDuckGoSearchTool, VisitWebpageTool, FinalAnswerTool, ImageQATool, GoogleSearchTool
|
| 2 |
from smolagents import Tool, tool
|
| 3 |
import random
|
| 4 |
from huggingface_hub import list_models
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
# Initialize the DuckDuckGo search tool
|
| 12 |
+
web_search = GoogleSearchTool()
|
| 13 |
+
# web_search = DuckDuckGoSearchTool() # not working
|
| 14 |
|
| 15 |
visit_webpage = VisitWebpageTool()
|
| 16 |
|
| 17 |
final_answer = FinalAnswerTool()
|
| 18 |
|
| 19 |
+
image_qa = ImageQATool()
|
| 20 |
+
|
| 21 |
|
| 22 |
class WeatherInfoTool(Tool):
|
| 23 |
name = "weather_info"
|