Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -57,21 +57,16 @@ async def respond(audio):
|
|
57 |
theme = gr.themes.Base()
|
58 |
|
59 |
# Gradio interface for voice chat
|
60 |
-
with gr.Blocks() as
|
61 |
-
with gr.
|
62 |
input_audio = gr.Audio(sources=["microphone"], type="filepath", label="Voice Chat")
|
63 |
output_audio = gr.Audio(type="filepath", label="CrucialCoach", interactive=False, autoplay=True, elem_classes="audio")
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
)
|
71 |
-
|
72 |
-
# Gradio demo setup
|
73 |
-
with gr.Blocks(theme=theme, css="footer {visibility: hidden} textbox {resize: none}", title="CrucialCoach DEMO") as demo:
|
74 |
-
gr.TabbedInterface([voice], ['🗣️ Crucial Coach Chat'])
|
75 |
|
76 |
# Queue setup and launch
|
77 |
demo.queue(max_size=200)
|
|
|
57 |
theme = gr.themes.Base()
|
58 |
|
59 |
# Gradio interface for voice chat
|
60 |
+
with gr.Blocks(theme=theme, css="footer {visibility: hidden} textbox {resize: none}", title="CrucialCoach DEMO") as demo:
|
61 |
+
with gr.Tab("🗣️ Crucial Coach Chat"):
|
62 |
input_audio = gr.Audio(sources=["microphone"], type="filepath", label="Voice Chat")
|
63 |
output_audio = gr.Audio(type="filepath", label="CrucialCoach", interactive=False, autoplay=True, elem_classes="audio")
|
64 |
+
gr.Interface(
|
65 |
+
fn=respond,
|
66 |
+
inputs=input_audio,
|
67 |
+
outputs=output_audio,
|
68 |
+
live=True
|
69 |
+
)
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
# Queue setup and launch
|
72 |
demo.queue(max_size=200)
|