Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -164,7 +164,11 @@ def create_video_thread(
|
|
| 164 |
raise gr.Error("Could not fetch transcript. The video might not have one, or it could be private.")
|
| 165 |
|
| 166 |
transcript_arr = [
|
| 167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
for chunk in transcript.content
|
| 169 |
]
|
| 170 |
|
|
|
|
| 164 |
raise gr.Error("Could not fetch transcript. The video might not have one, or it could be private.")
|
| 165 |
|
| 166 |
transcript_arr = [
|
| 167 |
+
"{} [{} - {}]".format(
|
| 168 |
+
chunk.text.strip().replace("\n", " "),
|
| 169 |
+
ms_to_hhmmss(int(chunk.offset)),
|
| 170 |
+
ms_to_hhmmss(int(chunk.offset) + int(chunk.duration))
|
| 171 |
+
)
|
| 172 |
for chunk in transcript.content
|
| 173 |
]
|
| 174 |
|