Spaces:
Runtime error
Runtime error
Update tool.py
Browse files
tool.py
CHANGED
|
@@ -140,7 +140,7 @@ def analyze_excel_file(file_path: str, query: str) -> str:
|
|
| 140 |
|
| 141 |
|
| 142 |
## Analyze Youtube Transcript tools
|
| 143 |
-
|
| 144 |
def extract_video_id(youtube_url: str) -> str | None:
|
| 145 |
"""Extract the video ID from a YouTube URL.
|
| 146 |
|
|
@@ -165,7 +165,7 @@ def get_youtube_transcript(youtube_url: str) -> str:
|
|
| 165 |
"""Returns the transcript of a YouTube video as plain text.
|
| 166 |
|
| 167 |
Args:
|
| 168 |
-
youtube_url (str): Url of the youtube video. Supports standard and shortened formats like https://www.youtube.com/watch?v=VIDEO_ID and https://youtu
|
| 169 |
"""
|
| 170 |
video_id = extract_video_id(youtube_url)
|
| 171 |
if not video_id:
|
|
|
|
| 140 |
|
| 141 |
|
| 142 |
## Analyze Youtube Transcript tools
|
| 143 |
+
@tool
|
| 144 |
def extract_video_id(youtube_url: str) -> str | None:
|
| 145 |
"""Extract the video ID from a YouTube URL.
|
| 146 |
|
|
|
|
| 165 |
"""Returns the transcript of a YouTube video as plain text.
|
| 166 |
|
| 167 |
Args:
|
| 168 |
+
youtube_url (str): Url of the youtube video. Supports standard and shortened formats like https://www.youtube.com/watch?v=VIDEO_ID and https://youtu.be/VIDEO_ID .
|
| 169 |
"""
|
| 170 |
video_id = extract_video_id(youtube_url)
|
| 171 |
if not video_id:
|