simonraj commited on
Commit
71de052
·
verified ·
1 Parent(s): ef1d0d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -48,19 +48,20 @@ async def respond(audio):
48
 
49
  theme = gr.themes.Base()
50
 
51
- with gr.Blocks(theme=theme, css="footer {visibility: hidden}textbox{resize:none}", title="CrucialCoach DEMO") as demo:
52
- gr.Markdown("# CrucialCoach")
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", interactive=False, autoplay=True)
56
- gr.Interface(
57
- fn=respond,
58
- inputs=[input],
59
- outputs=[output],
60
- live=True,
61
- api_name="voice_chat",
62
- title="Voice Chat"
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()