Update app.py
Browse files
app.py
CHANGED
@@ -39,8 +39,7 @@ def transcribe(inputs, task):
|
|
39 |
def _return_yt_html_embed(yt_url):
|
40 |
video_id = yt_url.split("?v=")[-1]
|
41 |
HTML_str = (
|
42 |
-
f'<center> <iframe width="500" height="320" src="https://www.youtube.com/embed/{
|
43 |
-
video_id}"> </iframe>'
|
44 |
" </center>"
|
45 |
)
|
46 |
return HTML_str
|
@@ -107,7 +106,7 @@ file_transcribe = gr.Interface(
|
|
107 |
fn=transcribe,
|
108 |
inputs=[
|
109 |
gr.Audio(sources=["upload"], type="filepath", label="Audio file"),
|
110 |
-
gr.Radio(choices=["transcribe"
|
111 |
],
|
112 |
outputs="text",
|
113 |
title="Whisper Large V3 Turbo Shqip: Transcribe Audio",
|
@@ -116,7 +115,7 @@ file_transcribe = gr.Interface(
|
|
116 |
f"Whisper model [{model_id}](https://huggingface.co/{model_id}), specially adapted for the Albanian language, "
|
117 |
"powered by 🤗 Transformers. With just a click, transform microphone or audio file inputs of any length into "
|
118 |
"text with exceptional transcription quality."
|
119 |
-
)
|
120 |
allow_flagging="never",
|
121 |
)
|
122 |
|
@@ -124,7 +123,7 @@ mf_transcribe = gr.Interface(
|
|
124 |
fn=transcribe,
|
125 |
inputs=[
|
126 |
gr.Audio(sources=["microphone"], type="filepath"),
|
127 |
-
gr.Radio(choices=["transcribe"
|
128 |
],
|
129 |
outputs="text",
|
130 |
title="Whisper Large V3 Turbo Shqip: Transcribe Audio",
|
@@ -133,7 +132,7 @@ mf_transcribe = gr.Interface(
|
|
133 |
f"Whisper model [{model_id}](https://huggingface.co/{model_id}), specially adapted for the Albanian language, "
|
134 |
"powered by 🤗 Transformers. With just a click, transform microphone or audio file inputs of any length into "
|
135 |
"text with exceptional transcription quality."
|
136 |
-
)
|
137 |
allow_flagging="never",
|
138 |
)
|
139 |
|
@@ -142,7 +141,7 @@ yt_transcribe = gr.Interface(
|
|
142 |
inputs=[
|
143 |
gr.Textbox(
|
144 |
lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
|
145 |
-
gr.Radio(choices=["transcribe"
|
146 |
],
|
147 |
outputs=["html", "text"],
|
148 |
title="Whisper Large V3 Turbo Shqip: Transcribe Audio",
|
@@ -151,7 +150,7 @@ yt_transcribe = gr.Interface(
|
|
151 |
f"Whisper model [{model_id}](https://huggingface.co/{model_id}), specially adapted for the Albanian language, "
|
152 |
"powered by 🤗 Transformers. With just a click, transform microphone or audio file inputs of any length into "
|
153 |
"text with exceptional transcription quality."
|
154 |
-
)
|
155 |
allow_flagging="never",
|
156 |
)
|
157 |
|
|
|
39 |
def _return_yt_html_embed(yt_url):
|
40 |
video_id = yt_url.split("?v=")[-1]
|
41 |
HTML_str = (
|
42 |
+
f'<center> <iframe width="500" height="320" src="https://www.youtube.com/embed/{video_id}"> </iframe>'
|
|
|
43 |
" </center>"
|
44 |
)
|
45 |
return HTML_str
|
|
|
106 |
fn=transcribe,
|
107 |
inputs=[
|
108 |
gr.Audio(sources=["upload"], type="filepath", label="Audio file"),
|
109 |
+
gr.Radio(choices=["transcribe"], label="Task"),
|
110 |
],
|
111 |
outputs="text",
|
112 |
title="Whisper Large V3 Turbo Shqip: Transcribe Audio",
|
|
|
115 |
f"Whisper model [{model_id}](https://huggingface.co/{model_id}), specially adapted for the Albanian language, "
|
116 |
"powered by 🤗 Transformers. With just a click, transform microphone or audio file inputs of any length into "
|
117 |
"text with exceptional transcription quality."
|
118 |
+
),
|
119 |
allow_flagging="never",
|
120 |
)
|
121 |
|
|
|
123 |
fn=transcribe,
|
124 |
inputs=[
|
125 |
gr.Audio(sources=["microphone"], type="filepath"),
|
126 |
+
gr.Radio(choices=["transcribe"], label="Task"),
|
127 |
],
|
128 |
outputs="text",
|
129 |
title="Whisper Large V3 Turbo Shqip: Transcribe Audio",
|
|
|
132 |
f"Whisper model [{model_id}](https://huggingface.co/{model_id}), specially adapted for the Albanian language, "
|
133 |
"powered by 🤗 Transformers. With just a click, transform microphone or audio file inputs of any length into "
|
134 |
"text with exceptional transcription quality."
|
135 |
+
),
|
136 |
allow_flagging="never",
|
137 |
)
|
138 |
|
|
|
141 |
inputs=[
|
142 |
gr.Textbox(
|
143 |
lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
|
144 |
+
gr.Radio(choices=["transcribe"], label="Task")
|
145 |
],
|
146 |
outputs=["html", "text"],
|
147 |
title="Whisper Large V3 Turbo Shqip: Transcribe Audio",
|
|
|
150 |
f"Whisper model [{model_id}](https://huggingface.co/{model_id}), specially adapted for the Albanian language, "
|
151 |
"powered by 🤗 Transformers. With just a click, transform microphone or audio file inputs of any length into "
|
152 |
"text with exceptional transcription quality."
|
153 |
+
),
|
154 |
allow_flagging="never",
|
155 |
)
|
156 |
|