Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,19 +48,20 @@ async def respond(audio):
|
|
| 48 |
|
| 49 |
theme = gr.themes.Base()
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|
| 53 |
with gr.Row():
|
| 54 |
input = gr.Audio(label="Voice Chat", sources="microphone", type="filepath", waveform_options=False)
|
| 55 |
-
output = gr.Audio(label="CrucialCoach", type="filepath",
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
)
|
| 64 |
|
|
|
|
|
|
|
| 65 |
demo.queue(max_size=200)
|
| 66 |
demo.launch()
|
|
|
|
| 48 |
|
| 49 |
theme = gr.themes.Base()
|
| 50 |
|
| 51 |
+
|
| 52 |
+
with gr.Blocks() as voice:
|
| 53 |
with gr.Row():
|
| 54 |
input = gr.Audio(label="Voice Chat", sources="microphone", type="filepath", waveform_options=False)
|
| 55 |
+
output = gr.Audio(label="CrucialCoach", type="filepath",
|
| 56 |
+
interactive=False,
|
| 57 |
+
autoplay=True,
|
| 58 |
+
elem_classes="audio")
|
| 59 |
+
gr.Interface(
|
| 60 |
+
fn=respond,
|
| 61 |
+
inputs=[input],
|
| 62 |
+
outputs=[output], live=True)
|
|
|
|
| 63 |
|
| 64 |
+
with gr.Blocks(theme=theme, css="footer {visibility: hidden}textbox{resize:none}", title="CrucialCoach DEMO") as demo:
|
| 65 |
+
gr.TabbedInterface([voice], ['🗣️ Crucial Coach Chat'])
|
| 66 |
demo.queue(max_size=200)
|
| 67 |
demo.launch()
|