fffiloni commited on
Commit
7b60e38
·
1 Parent(s): b9c032c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -95,17 +95,26 @@ examples=[["I'm planning a vacation to Japan. Can you suggest a one-week itinera
95
  ]
96
 
97
  css="""
98
- .gradio-container{
99
  max-width: 720px!important;
100
  }
101
  """
102
 
 
 
 
 
 
 
 
103
  gr.ChatInterface(
104
  fn=generate,
105
- chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, bubble_full_width=False, avatar_images=[None, "santa_avatar.png"], elem_id="chat-interface"),
106
  #additional_inputs=additional_inputs,
107
  title="Chat with Santa",
108
  #examples=examples,
109
  concurrency_limit=20,
110
  css=css
111
- ).launch(show_api=False)
 
 
 
95
  ]
96
 
97
  css="""
98
+ #col-container{
99
  max-width: 720px!important;
100
  }
101
  """
102
 
103
+ with gr.Blocks(css=css) as demo:
104
+ with gr.Column(elem_id="col-container"):
105
+ chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, bubble_full_width=False, avatar_images=[None, "santa_avatar.png"])
106
+ msg=gr.Textbox()
107
+ msg.submit(generate, [msg, chatbot], [msg, chatbot])
108
+
109
+ """
110
  gr.ChatInterface(
111
  fn=generate,
112
+ chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, bubble_full_width=False, avatar_images=[None, "santa_avatar.png"]),
113
  #additional_inputs=additional_inputs,
114
  title="Chat with Santa",
115
  #examples=examples,
116
  concurrency_limit=20,
117
  css=css
118
+ ).launch(show_api=False)
119
+ """
120
+ demo.launch()