Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,14 +59,15 @@ theme = gr.themes.Base()
|
|
| 59 |
# Gradio interface for voice chat
|
| 60 |
with gr.Blocks() as voice:
|
| 61 |
with gr.Row():
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
|
|
|
| 70 |
|
| 71 |
# Gradio demo setup
|
| 72 |
with gr.Blocks(theme=theme, css="footer {visibility: hidden} textbox {resize: none}", title="CrucialCoach DEMO") as demo:
|
|
|
|
| 59 |
# Gradio interface for voice chat
|
| 60 |
with gr.Blocks() as voice:
|
| 61 |
with gr.Row():
|
| 62 |
+
input_audio = gr.Audio(source="microphone", type="filepath", label="Voice Chat")
|
| 63 |
+
output_audio = gr.Audio(type="filepath", label="CrucialCoach", interactive=False, autoplay=True, elem_classes="audio")
|
| 64 |
+
|
| 65 |
+
gr.Interface(
|
| 66 |
+
fn=respond,
|
| 67 |
+
inputs=[input_audio],
|
| 68 |
+
outputs=[output_audio],
|
| 69 |
+
live=True
|
| 70 |
+
)
|
| 71 |
|
| 72 |
# Gradio demo setup
|
| 73 |
with gr.Blocks(theme=theme, css="footer {visibility: hidden} textbox {resize: none}", title="CrucialCoach DEMO") as demo:
|