DiamondYin commited on
Commit
fbd10e8
·
1 Parent(s): 7e2033c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -104,18 +104,18 @@ def get_response(history, audio_input):
104
  # buzz_usr_proc = Thread(target=idle_timer)
105
 
106
  with gr.Blocks(css = """#col_image{width:800px; height:800px; margin-left: auto; margin-right: auto;}""") as demo:
107
- with gr.Column():
108
  output_html = gr.HTML(label="Felix's Voice", value=AUDIO_HTML)
109
  output_html.visible = False
110
  image1= gr.Image("assets/NPCtest1.png").style(height=700) #elem_id = "col_image"
111
  #assistant_character = gr.HTML(label=None, value=CHAR_IDLE_HTML, show_label=False)
112
- #with gr.Column(scale=0.1):
113
- chatbot = gr.Chatbot(label='Send a text or a voice input').style(height=285)
114
- with gr.Row():
115
- msg = gr.Textbox(placeholder='Write a chat & press Enter.', show_label=False).style(container=False)
116
- with gr.Column(scale=0.5):
117
- audio_input = gr.Audio(source="microphone", type='filepath', show_label=False).style(container=False)
118
- button = gr.Button(value="Send")
119
 
120
  msg.submit(get_chat_history, [msg, chatbot], [msg, chatbot]
121
  ).then(get_response, [chatbot, audio_input], [chatbot, output_html]
 
104
  # buzz_usr_proc = Thread(target=idle_timer)
105
 
106
  with gr.Blocks(css = """#col_image{width:800px; height:800px; margin-left: auto; margin-right: auto;}""") as demo:
107
+ with gr.Row(scale=0.7):
108
  output_html = gr.HTML(label="Felix's Voice", value=AUDIO_HTML)
109
  output_html.visible = False
110
  image1= gr.Image("assets/NPCtest1.png").style(height=700) #elem_id = "col_image"
111
  #assistant_character = gr.HTML(label=None, value=CHAR_IDLE_HTML, show_label=False)
112
+ with gr.Column(scale=0.3):
113
+ chatbot = gr.Chatbot(label='Send a text or a voice input').style(height=285)
114
+ with gr.Column():
115
+ msg = gr.Textbox(placeholder='Write a chat & press Enter.', show_label=False).style(container=False)
116
+ with gr.Column(scale=0.5):
117
+ audio_input = gr.Audio(source="microphone", type='filepath', show_label=False).style(container=False)
118
+ button = gr.Button(value="Send")
119
 
120
  msg.submit(get_chat_history, [msg, chatbot], [msg, chatbot]
121
  ).then(get_response, [chatbot, audio_input], [chatbot, output_html]