Spaces:
Sleeping
Sleeping
Vladyslav Khaitov commited on
Commit ·
c7e8fb8
1
Parent(s): 8e26419
Minor cleanup of agent script
Browse files- smolagents_agent.py +7 -10
smolagents_agent.py
CHANGED
|
@@ -1,16 +1,15 @@
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
from dotenv import load_dotenv
|
| 4 |
-
from smolagents import (CodeAgent, InferenceClientModel,
|
| 5 |
-
|
| 6 |
-
PythonInterpreterTool, \
|
| 7 |
-
FinalAnswerTool, GradioUI)
|
| 8 |
|
| 9 |
-
from tools import (TextFileInspectorTool, ImageInspectorTool,
|
| 10 |
-
# VisualQATool, YouTubeVideoInspectorTool
|
| 11 |
-
YouTubeVisualInspectorTool, YouTubeAudioTranscriberTool,
|
| 12 |
-
AudioTranscriberTool)
|
| 13 |
from tools import (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
ArchiveSearchTool,
|
| 15 |
FinderTool,
|
| 16 |
FindNextTool,
|
|
@@ -106,8 +105,6 @@ def create_agent():
|
|
| 106 |
youtube_audio_transcriber_tool = YouTubeAudioTranscriberTool(model)
|
| 107 |
python_interpreter = PythonInterpreterTool()
|
| 108 |
final_answer = FinalAnswerTool()
|
| 109 |
-
# TODO:
|
| 110 |
-
# YoutubeVideo Viewer / Transcript
|
| 111 |
|
| 112 |
# Agent (model + prompt + tools)
|
| 113 |
# with open("prompts.yaml", 'r') as stream:
|
|
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
from dotenv import load_dotenv
|
| 4 |
+
from smolagents import (CodeAgent, InferenceClientModel, GoogleSearchTool,
|
| 5 |
+
PythonInterpreterTool, FinalAnswerTool, GradioUI)
|
|
|
|
|
|
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
from tools import (
|
| 8 |
+
TextFileInspectorTool,
|
| 9 |
+
ImageInspectorTool,
|
| 10 |
+
# VisualQATool, YouTubeVideoInspectorTool
|
| 11 |
+
YouTubeVisualInspectorTool, YouTubeAudioTranscriberTool,
|
| 12 |
+
AudioTranscriberTool,
|
| 13 |
ArchiveSearchTool,
|
| 14 |
FinderTool,
|
| 15 |
FindNextTool,
|
|
|
|
| 105 |
youtube_audio_transcriber_tool = YouTubeAudioTranscriberTool(model)
|
| 106 |
python_interpreter = PythonInterpreterTool()
|
| 107 |
final_answer = FinalAnswerTool()
|
|
|
|
|
|
|
| 108 |
|
| 109 |
# Agent (model + prompt + tools)
|
| 110 |
# with open("prompts.yaml", 'r') as stream:
|