Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
4314e4c
1
Parent(s):
0a7fcda
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,6 @@ import torch
|
|
3 |
import gradio as gr
|
4 |
import pytube as pt
|
5 |
from transformers import pipeline
|
6 |
-
from huggingface_hub import model_info
|
7 |
|
8 |
MODEL_NAME = "openai/whisper-tiny"
|
9 |
|
@@ -22,7 +21,7 @@ transcribe_token_id = all_special_ids[-5]
|
|
22 |
translate_token_id = all_special_ids[-6]
|
23 |
|
24 |
|
25 |
-
def transcribe(microphone, file_upload,
|
26 |
warn_output = ""
|
27 |
if (microphone is not None) and (file_upload is not None):
|
28 |
warn_output = (
|
@@ -103,4 +102,4 @@ yt_transcribe = gr.Interface(
|
|
103 |
with demo:
|
104 |
gr.TabbedInterface([mf_transcribe, yt_transcribe], ["Transcribe Audio", "Transcribe YouTube"])
|
105 |
|
106 |
-
demo.launch(enable_queue=True)
|
|
|
3 |
import gradio as gr
|
4 |
import pytube as pt
|
5 |
from transformers import pipeline
|
|
|
6 |
|
7 |
MODEL_NAME = "openai/whisper-tiny"
|
8 |
|
|
|
21 |
translate_token_id = all_special_ids[-6]
|
22 |
|
23 |
|
24 |
+
def transcribe(microphone, file_upload, do_translate):
|
25 |
warn_output = ""
|
26 |
if (microphone is not None) and (file_upload is not None):
|
27 |
warn_output = (
|
|
|
102 |
with demo:
|
103 |
gr.TabbedInterface([mf_transcribe, yt_transcribe], ["Transcribe Audio", "Transcribe YouTube"])
|
104 |
|
105 |
+
demo.launch(enable_queue=True, share=True)
|