NotYuSheng commited on
Commit
18f83a2
·
verified ·
1 Parent(s): 74d41f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -18
app.py CHANGED
@@ -32,24 +32,25 @@ def main():
32
  bubble_full_width=False,
33
  scale=1,
34
  )
35
- chat_input = gr.MultimodalTextbox(interactive=True,
36
- #file_count="multiple",
37
- placeholder="Enter message or upload file...",
38
- show_label=False)
39
- user_input = gr.State()
40
- chat_msg = chat_input.submit(add_message, [chatbot, chat_input], [chatbot, chat_input, user_input])
41
- bot_msg = chat_msg.then(bot, [chatbot, user_input], chatbot, api_name="bot_response")
42
- bot_msg.then(lambda: gr.MultimodalTextbox(interactive=True), None, [chat_input])
43
- chatbot.like(print_like_dislike, None, None)
44
-
45
- """
46
- # Add examples
47
- gr.Examples(
48
- examples=examples,
49
- inputs=chat_input,
50
- label="Click on an example to try it"
51
- )
52
- """
 
53
 
54
  # Start the queue and launch the interface
55
  webApp.queue()
 
32
  bubble_full_width=False,
33
  scale=1,
34
  )
35
+ with gr.Column(scale=8):
36
+ chat_input = gr.MultimodalTextbox(interactive=True,
37
+ #file_count="multiple",
38
+ placeholder="Enter message or upload file...",
39
+ show_label=False)
40
+ user_input = gr.State()
41
+ chat_msg = chat_input.submit(add_message, [chatbot, chat_input], [chatbot, chat_input, user_input])
42
+ bot_msg = chat_msg.then(bot, [chatbot, user_input], chatbot, api_name="bot_response")
43
+ bot_msg.then(lambda: gr.MultimodalTextbox(interactive=True), None, [chat_input])
44
+ chatbot.like(print_like_dislike, None, None)
45
+
46
+ with gr.Column(scale=3):
47
+ # Add examples
48
+ gr.Examples(
49
+ examples=examples,
50
+ inputs=chat_input,
51
+ label="Click on an example to try it"
52
+ )
53
+
54
 
55
  # Start the queue and launch the interface
56
  webApp.queue()