Isidorophp commited on
Commit
59faec5
·
verified ·
1 Parent(s): 35b3d08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -104,19 +104,19 @@ with gr.Blocks(gr.themes.Citrus()) as demo:
104
  """ <center><h3> I suggest, you ask me for a Spell : </h3></center> """)
105
 
106
 
107
- with gr.Tab("Talk to Hermione"):
108
- with gr.Row():
109
  user_voice = gr.Dropdown(choices=list(Female_language_dict.keys()), value="English (UK)-Maisie- (Female)" , label="Select Voice for Hermione")
110
  us_input = gr.Audio(label="Your Voice Chat", type="filepath", interactive=True, sources="microphone", scale=1, waveform_options=None)
111
  us_output = gr.Audio(label="Hermione's Response", type="filepath", interactive=False, autoplay=True, scale=1, elem_classes="audio")
112
  gr.Interface(fn=respond, inputs=[user_voice, us_input], outputs=us_output, live=False)
113
 
114
- with gr.Tab("Write to Hermione"):
115
- with gr.Row():
116
  user_voice = gr.Dropdown(choices=list(Female_language_dict.keys()), value="English (UK)-Maisie- (Female)" , label="Select Voice for Hermione", scale=1)
117
  user_input = gr.TextArea(label="Your Question", scale=1, value="If there is any spell to encapsulate you as a piece of the cog, where Hermione is to everyone's favorite magical trio, it has to be...?")
118
  output_audio = gr.Audio(label="Hermione's Response", type="filepath", interactive=False, autoplay=True, scale=2, elem_classes="audio")
119
-
120
  translate_btn = gr.Button("Submit")
121
  translate_btn.click(fn=generate1, inputs=[user_voice, user_input], outputs=output_audio, api_name="translate")
122
 
 
104
  """ <center><h3> I suggest, you ask me for a Spell : </h3></center> """)
105
 
106
 
107
+ with gr.Tab("Talk to Hermione", scale=1):
108
+ with gr.Row(scale=2):
109
  user_voice = gr.Dropdown(choices=list(Female_language_dict.keys()), value="English (UK)-Maisie- (Female)" , label="Select Voice for Hermione")
110
  us_input = gr.Audio(label="Your Voice Chat", type="filepath", interactive=True, sources="microphone", scale=1, waveform_options=None)
111
  us_output = gr.Audio(label="Hermione's Response", type="filepath", interactive=False, autoplay=True, scale=1, elem_classes="audio")
112
  gr.Interface(fn=respond, inputs=[user_voice, us_input], outputs=us_output, live=False)
113
 
114
+ with gr.Tab("Write to Hermione", scale=1):
115
+ with gr.Row(variant = "panel" , scale=2):
116
  user_voice = gr.Dropdown(choices=list(Female_language_dict.keys()), value="English (UK)-Maisie- (Female)" , label="Select Voice for Hermione", scale=1)
117
  user_input = gr.TextArea(label="Your Question", scale=1, value="If there is any spell to encapsulate you as a piece of the cog, where Hermione is to everyone's favorite magical trio, it has to be...?")
118
  output_audio = gr.Audio(label="Hermione's Response", type="filepath", interactive=False, autoplay=True, scale=2, elem_classes="audio")
119
+ with gr.Row(scale=2):
120
  translate_btn = gr.Button("Submit")
121
  translate_btn.click(fn=generate1, inputs=[user_voice, user_input], outputs=output_audio, api_name="translate")
122