Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -53,9 +53,16 @@ stream = Stream(
|
|
53 |
ui_args={"title": ""},
|
54 |
)
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
with gr.Blocks() as demo:
|
57 |
gr.HTML(
|
58 |
-
|
59 |
<h1 style='text-align: center; display: flex; align-items: center; justify-content: center;'>
|
60 |
<img src="/gradio_api/file=AV_Huggy.png" alt="Streaming Huggy" style="height: 50px; margin-right: 10px"> Really Fast Whisper
|
61 |
</h1>
|
@@ -70,14 +77,11 @@ with gr.Blocks() as demo:
|
|
70 |
)
|
71 |
with gr.Tabs():
|
72 |
with gr.Tab("Streaming"):
|
73 |
-
gr.Markdown(
|
|
|
|
|
74 |
stream.ui.render()
|
75 |
with gr.Tab("File Upload"):
|
76 |
-
|
77 |
-
fn=transcribe_file,
|
78 |
-
inputs=[gr.Audio(label="Upload Audio", sources=["upload", "microphone"])],
|
79 |
-
outputs=gr.Textbox(label="Transcript"),
|
80 |
-
).render()
|
81 |
-
|
82 |
if __name__ == "__main__":
|
83 |
demo.launch(allowed_paths=["AV_Huggy.png"])
|
|
|
53 |
ui_args={"title": ""},
|
54 |
)
|
55 |
|
56 |
+
iface = gr.Interface(
|
57 |
+
fn=transcribe_file,
|
58 |
+
inputs=[gr.Audio(label="Upload Audio", sources=["upload", "microphone"])],
|
59 |
+
outputs=gr.Textbox(label="Transcript"),
|
60 |
+
)
|
61 |
+
|
62 |
+
|
63 |
with gr.Blocks() as demo:
|
64 |
gr.HTML(
|
65 |
+
"""
|
66 |
<h1 style='text-align: center; display: flex; align-items: center; justify-content: center;'>
|
67 |
<img src="/gradio_api/file=AV_Huggy.png" alt="Streaming Huggy" style="height: 50px; margin-right: 10px"> Really Fast Whisper
|
68 |
</h1>
|
|
|
77 |
)
|
78 |
with gr.Tabs():
|
79 |
with gr.Tab("Streaming"):
|
80 |
+
gr.Markdown(
|
81 |
+
"Grant access to the microphone and speak naturally. The transcript will be updated as you pause."
|
82 |
+
)
|
83 |
stream.ui.render()
|
84 |
with gr.Tab("File Upload"):
|
85 |
+
iface.render()
|
|
|
|
|
|
|
|
|
|
|
86 |
if __name__ == "__main__":
|
87 |
demo.launch(allowed_paths=["AV_Huggy.png"])
|