Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,10 @@ def transcribe(microphone, file_upload, task):
|
|
39 |
|
40 |
text = pipe(file, batch_size=BATCH_SIZE)["text"]
|
41 |
|
42 |
-
|
|
|
|
|
|
|
43 |
|
44 |
|
45 |
def _return_yt_html_embed(yt_url):
|
@@ -73,7 +76,7 @@ mf_transcribe = gr.Interface(
|
|
73 |
gr.inputs.Audio(source="upload", type="filepath", optional=True),
|
74 |
gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
|
75 |
],
|
76 |
-
outputs="text",
|
77 |
layout="horizontal",
|
78 |
theme="huggingface",
|
79 |
title="Whisper Large V2: Transcribe Audio",
|
|
|
39 |
|
40 |
text = pipe(file, batch_size=BATCH_SIZE)["text"]
|
41 |
|
42 |
+
with open('outt.txt', 'a+') as sw:
|
43 |
+
sw.writelines(text)
|
44 |
+
|
45 |
+
return [warn_output + text,"outt.txt"]
|
46 |
|
47 |
|
48 |
def _return_yt_html_embed(yt_url):
|
|
|
76 |
gr.inputs.Audio(source="upload", type="filepath", optional=True),
|
77 |
gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
|
78 |
],
|
79 |
+
outputs=["text",gr.File(label="Download")],
|
80 |
layout="horizontal",
|
81 |
theme="huggingface",
|
82 |
title="Whisper Large V2: Transcribe Audio",
|