Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@ import pytz
|
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
from tools.transcription_tool import YoutubeTranscriptions
|
|
|
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
import os
|
|
@@ -44,6 +45,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 44 |
|
| 45 |
final_answer = FinalAnswerTool()
|
| 46 |
Transcriptions = YoutubeTranscriptions()
|
|
|
|
| 47 |
transcript = YoutubeTranscriptions().forward("https://www.youtube.com/watch?v=pp5CcOUmnyo")
|
| 48 |
print(transcript)
|
| 49 |
model = HfApiModel(
|
|
@@ -62,7 +64,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 62 |
|
| 63 |
agent = CodeAgent(
|
| 64 |
model=model,
|
| 65 |
-
tools=[final_answer,
|
| 66 |
max_steps=6,
|
| 67 |
verbosity_level=1,
|
| 68 |
grammar=None,
|
|
|
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
from tools.transcription_tool import YoutubeTranscriptions
|
| 8 |
+
from tools.visit_webpage import VisitWebpageTool
|
| 9 |
|
| 10 |
from Gradio_UI import GradioUI
|
| 11 |
import os
|
|
|
|
| 45 |
|
| 46 |
final_answer = FinalAnswerTool()
|
| 47 |
Transcriptions = YoutubeTranscriptions()
|
| 48 |
+
WebPage = VisitWebpageTool()
|
| 49 |
transcript = YoutubeTranscriptions().forward("https://www.youtube.com/watch?v=pp5CcOUmnyo")
|
| 50 |
print(transcript)
|
| 51 |
model = HfApiModel(
|
|
|
|
| 64 |
|
| 65 |
agent = CodeAgent(
|
| 66 |
model=model,
|
| 67 |
+
tools=[final_answer,WebPage], ## add your tools here (don't remove final answer)
|
| 68 |
max_steps=6,
|
| 69 |
verbosity_level=1,
|
| 70 |
grammar=None,
|