Spaces:
Runtime error
Runtime error
Commit
•
830c50a
1
Parent(s):
004df72
update
Browse files
app.py
CHANGED
@@ -6,8 +6,6 @@ import subprocess
|
|
6 |
import os
|
7 |
import urllib.parse
|
8 |
|
9 |
-
subprocess.run(['apt', 'install', 'ffmpeg'])
|
10 |
-
|
11 |
term = 9
|
12 |
|
13 |
transcriber = pipeline("automatic-speech-recognition", model="filipzawadka/whisper-small-pl-2")
|
@@ -109,9 +107,9 @@ def transcribe(num1,num2):
|
|
109 |
videos = get_sejm_videos(term)
|
110 |
print(videos[0]['videoLink'])
|
111 |
|
112 |
-
if download_video(offset_time(videos[0]['videoLink'],num1,num2), "./video.
|
113 |
-
extract_audio("./video.mov", "./audio.mp3")
|
114 |
-
return transcriber("./
|
115 |
|
116 |
|
117 |
demo = gr.Interface(
|
|
|
6 |
import os
|
7 |
import urllib.parse
|
8 |
|
|
|
|
|
9 |
term = 9
|
10 |
|
11 |
transcriber = pipeline("automatic-speech-recognition", model="filipzawadka/whisper-small-pl-2")
|
|
|
107 |
videos = get_sejm_videos(term)
|
108 |
print(videos[0]['videoLink'])
|
109 |
|
110 |
+
if download_video(offset_time(videos[0]['videoLink'],num1,num2), "./video.mp4"):
|
111 |
+
#extract_audio("./video.mov", "./audio.mp3")
|
112 |
+
return transcriber("./video.mp4")["text"]
|
113 |
|
114 |
|
115 |
demo = gr.Interface(
|