Update app.py
Browse files
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 |
-
|
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"]
|
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()
|