Update app.py
Browse files
app.py
CHANGED
@@ -27,6 +27,9 @@ from youtube_transcript_api import YouTubeTranscriptApi
|
|
27 |
from smolagents import Tool
|
28 |
from youtube_transcript_api import YouTubeTranscriptApi
|
29 |
|
|
|
|
|
|
|
30 |
class YouTubeTranscriptTool(Tool):
|
31 |
name = "youtube_transcript"
|
32 |
description = "Extracts transcript text from a YouTube video URL"
|
@@ -43,7 +46,7 @@ class YouTubeTranscriptTool(Tool):
|
|
43 |
"description": "Transcript text from the video"
|
44 |
}
|
45 |
}
|
46 |
-
output_type = "object"
|
47 |
|
48 |
def __call__(self, url: str) -> dict:
|
49 |
video_id = url.split("v=")[-1].split("&")[0]
|
|
|
27 |
from smolagents import Tool
|
28 |
from youtube_transcript_api import YouTubeTranscriptApi
|
29 |
|
30 |
+
from smolagents import Tool
|
31 |
+
from youtube_transcript_api import YouTubeTranscriptApi
|
32 |
+
|
33 |
class YouTubeTranscriptTool(Tool):
|
34 |
name = "youtube_transcript"
|
35 |
description = "Extracts transcript text from a YouTube video URL"
|
|
|
46 |
"description": "Transcript text from the video"
|
47 |
}
|
48 |
}
|
49 |
+
output_type = "object"
|
50 |
|
51 |
def __call__(self, url: str) -> dict:
|
52 |
video_id = url.split("v=")[-1].split("&")[0]
|