Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,10 +65,19 @@ def yt_transcribe(yt_url, task):
|
|
| 65 |
|
| 66 |
text = pipe("audio.mp3", batch_size=BATCH_SIZE)["text"]
|
| 67 |
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
demo = gr.Blocks()
|
| 71 |
output_2 = gr.File(label="Download")
|
|
|
|
| 72 |
description = """This application displays transcribed text for given audio input <img src="https://i.ibb.co/J5DscKw/GVP-Womens.jpg" width=100px>"""
|
| 73 |
mf_transcribe = gr.Interface(
|
| 74 |
fn=transcribe,
|
|
@@ -91,7 +100,7 @@ yt_transcribe = gr.Interface(
|
|
| 91 |
gr.inputs.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
|
| 92 |
gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe")
|
| 93 |
],
|
| 94 |
-
|
| 95 |
layout="horizontal",
|
| 96 |
theme="huggingface",
|
| 97 |
title="Speech to Text Converter using OpenAI Whisper Model",
|
|
|
|
| 65 |
|
| 66 |
text = pipe("audio.mp3", batch_size=BATCH_SIZE)["text"]
|
| 67 |
|
| 68 |
+
|
| 69 |
+
with open('outtt.txt', 'a+') as sw:
|
| 70 |
+
sw.writelines(text)
|
| 71 |
+
|
| 72 |
+
return [text,"outtt.txt"]
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
|
| 77 |
|
| 78 |
demo = gr.Blocks()
|
| 79 |
output_2 = gr.File(label="Download")
|
| 80 |
+
output_3 = gr.File(label="Download")
|
| 81 |
description = """This application displays transcribed text for given audio input <img src="https://i.ibb.co/J5DscKw/GVP-Womens.jpg" width=100px>"""
|
| 82 |
mf_transcribe = gr.Interface(
|
| 83 |
fn=transcribe,
|
|
|
|
| 100 |
gr.inputs.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
|
| 101 |
gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe")
|
| 102 |
],
|
| 103 |
+
outputs=["text",output_3],
|
| 104 |
layout="horizontal",
|
| 105 |
theme="huggingface",
|
| 106 |
title="Speech to Text Converter using OpenAI Whisper Model",
|