Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ with gr.Blocks() as demo:
|
|
23 |
gr.Markdown("Whisper Small Swedish")
|
24 |
with gr.Row():
|
25 |
with gr.TabItem("Record from Microphone"):
|
26 |
-
|
27 |
record_button = gr.Button("Submit")
|
28 |
record_outputs = [gr.Textbox(label="Transcription from Microphone"),]
|
29 |
|
@@ -37,8 +37,14 @@ with gr.Blocks() as demo:
|
|
37 |
]
|
38 |
with gr.Row().style(equal_height=True):
|
39 |
youtube_button = gr.Button("Submit")
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
42 |
youtube_button.click( fn=link_transcribe, inputs=link, outputs=youtube_outputs,)
|
|
|
43 |
link.change(fn=populate_metadata, inputs=[link], outputs=[img, title])
|
44 |
demo.launch()
|
|
|
23 |
gr.Markdown("Whisper Small Swedish")
|
24 |
with gr.Row():
|
25 |
with gr.TabItem("Record from Microphone"):
|
26 |
+
record_input = gr.Audio(source="microphone", type="filepath",label="Record from microphone")
|
27 |
record_button = gr.Button("Submit")
|
28 |
record_outputs = [gr.Textbox(label="Transcription from Microphone"),]
|
29 |
|
|
|
37 |
]
|
38 |
with gr.Row().style(equal_height=True):
|
39 |
youtube_button = gr.Button("Submit")
|
40 |
+
with gr.Row():
|
41 |
+
with gr.TabItem("Audio File"):
|
42 |
+
offline_file = gr.Audio(source="upload", type="filepath",label="Upload An Audio File")
|
43 |
+
offline_upload = gr.Button("Submit")
|
44 |
+
offline_outputs = [gr.Textbox(label="Transcription from uploaded audio file"),]
|
45 |
+
|
46 |
+
record_button.click( fn=transcribe, inputs=record_input, outputs=record_outputs,)
|
47 |
youtube_button.click( fn=link_transcribe, inputs=link, outputs=youtube_outputs,)
|
48 |
+
offline_upload.click( fn=transcribe, inputs=offline_file, outputs=offline_outputs,)
|
49 |
link.change(fn=populate_metadata, inputs=[link], outputs=[img, title])
|
50 |
demo.launch()
|