Dani commited on
Commit
42fabe8
·
1 Parent(s): fb05f67

transcribe

Browse files
Files changed (1) hide show
  1. app.py +16 -16
app.py CHANGED
@@ -24,11 +24,11 @@ import os
24
  from pydub import AudioSegment
25
  from huggingface_hub import login
26
 
27
- with open("../../token.txt", "r") as file:
28
- token = file.readline().strip()
29
-
30
-
31
- login(token=token, add_to_git_credential=True)
32
 
33
  pipe = pipeline(model="dacavi/whisper-small-hi")
34
 
@@ -49,14 +49,14 @@ def transcribe_video(video_url):
49
 
50
 
51
  return text
52
- print(transcribe_video("https://www.youtube.com/watch?v=8FkLRUJj-o0"))
53
- # iface = gr.Interface(
54
- # fn=transcribe_video,
55
- # inputs="text",
56
- # outputs="text",
57
- # live=True,
58
- # title="Video Transcription",
59
- # description="Paste the URL of a video to transcribe the spoken content.",
60
- # )
61
- #
62
- # iface.launch()
 
24
  from pydub import AudioSegment
25
  from huggingface_hub import login
26
 
27
+ # with open("../../token.txt", "r") as file:
28
+ # token = file.readline().strip()
29
+ #
30
+ #
31
+ # login(token=token, add_to_git_credential=True)
32
 
33
  pipe = pipeline(model="dacavi/whisper-small-hi")
34
 
 
49
 
50
 
51
  return text
52
+
53
+ iface = gr.Interface(
54
+ fn=transcribe_video,
55
+ inputs="text",
56
+ outputs="text",
57
+ live=True,
58
+ title="Video Transcription",
59
+ description="Paste the URL of a video to transcribe the spoken content.",
60
+ )
61
+
62
+ iface.launch()