File size: 1,079 Bytes
8e7817a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from smolagents import Tool, DuckDuckGoSearchTool, GoogleSearchTool, VisitWebpageTool, WikipediaSearchTool, PythonInterpreterTool, FinalAnswerTool
from tavily import TavilyClient
from dotenv import load_dotenv
import os

load_dotenv()

# Inicialización de herramientas
duck_search = DuckDuckGoSearchTool()
google_search = GoogleSearchTool()
visit_page = VisitWebpageTool()
wiki_search = WikipediaSearchTool()
do_python = PythonInterpreterTool()
final_answer = FinalAnswerTool()
tavily_search = TavilyClient()

speech_to_text_tool = Tool.from_space("hf-audio/whisper-large-v3-turbo", 
                                      name="speech_to_text_tool", 
                                      description="Convierte audio a texto a partir de un archivo o URL.",
                                      api_name="/predict")

visual_qa_tool = Tool.from_space("sitammeur/PicQ",
                                 name="visual_qa_tool",
                                 description="Responde preguntas sobre una imagen proporcionada.",
                                 api_name="/predict")