Spaces:
Sleeping
Sleeping
Download tool.py from umarbalak/agents_course: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/spaces/umarbalak/agents_course/resolve/main/tool.py
- Command line
-
hf download hf://spaces/umarbalak/agents_course/tool.py
-
curl -L -o tool.py https://huggingface.co/spaces/umarbalak/agents_course/resolve/main/tool.py
1.07 kB
| from typing import List | |
| from smolagents import ( | |
| DuckDuckGoSearchTool, | |
| PythonInterpreterTool, | |
| Tool, | |
| VisitWebpageTool, | |
| WikipediaSearchTool, | |
| FinalAnswerTool, | |
| ) | |
| from tools.tools import ( | |
| vision_tool, | |
| youtube_frames_to_images, | |
| ask_youtube_video, | |
| read_text_file, | |
| file_from_url, | |
| transcribe_youtube, | |
| audio_to_text, | |
| extract_text_via_ocr, | |
| summarize_csv_data, | |
| summarize_excel_data, | |
| ) | |
| def get_tools() -> List[Tool]: | |
| """ | |
| Returns a list of available tools for the agent. | |
| Returns: | |
| List[Tool]: List of initialized tool instances. | |
| """ | |
| tools = [ | |
| FinalAnswerTool(), | |
| DuckDuckGoSearchTool(), | |
| PythonInterpreterTool(), | |
| WikipediaSearchTool(), | |
| VisitWebpageTool(), | |
| vision_tool, | |
| youtube_frames_to_images, | |
| ask_youtube_video, | |
| read_text_file, | |
| file_from_url, | |
| transcribe_youtube, | |
| audio_to_text, | |
| extract_text_via_ocr, | |
| summarize_csv_data, | |
| summarize_excel_data, | |
| ] | |
| return tools |