simonraj commited on
Commit
791889e
1 Parent(s): 6d7626f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -13
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 voice:
61
- with gr.Row():
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
- 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:
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)