Dani
commited on
Commit
·
42fabe8
1
Parent(s):
fb05f67
transcribe
Browse files
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 |
-
|
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 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
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()
|