Update app.py
Browse files
app.py
CHANGED
@@ -21,19 +21,22 @@ from youtube_transcript_api import YouTubeTranscriptApi
|
|
21 |
import re
|
22 |
|
23 |
|
|
|
|
|
|
|
24 |
class YouTubeTranscriptTool(Tool):
|
25 |
name = "youtube_transcript"
|
26 |
description = "Extracts transcript text from a YouTube video URL"
|
27 |
|
28 |
inputs = {
|
29 |
"url": {
|
30 |
-
"type": "
|
31 |
"description": "YouTube video URL"
|
32 |
}
|
33 |
}
|
34 |
outputs = {
|
35 |
"transcript": {
|
36 |
-
"type": "
|
37 |
"description": "Transcript text from the video"
|
38 |
}
|
39 |
}
|
|
|
21 |
import re
|
22 |
|
23 |
|
24 |
+
from smolagents import Tool
|
25 |
+
from youtube_transcript_api import YouTubeTranscriptApi
|
26 |
+
|
27 |
class YouTubeTranscriptTool(Tool):
|
28 |
name = "youtube_transcript"
|
29 |
description = "Extracts transcript text from a YouTube video URL"
|
30 |
|
31 |
inputs = {
|
32 |
"url": {
|
33 |
+
"type": "string", # ✅ FIXED: Use OpenAPI type
|
34 |
"description": "YouTube video URL"
|
35 |
}
|
36 |
}
|
37 |
outputs = {
|
38 |
"transcript": {
|
39 |
+
"type": "string", # ✅ FIXED: Use OpenAPI type
|
40 |
"description": "Transcript text from the video"
|
41 |
}
|
42 |
}
|