Spaces:
Runtime error
Runtime error
update css styling for chatbot
Browse filesadded a column container and added styling to chatbot and column to center the chatbot and to increase the window size
app.py
CHANGED
@@ -32,12 +32,13 @@ def chat(user_input):
|
|
32 |
response += word + " "
|
33 |
yield [(user_input, response)]
|
34 |
|
35 |
-
with gr.Blocks(
|
|
|
36 |
gr.Markdown(f"## {TITLE}\n\n\n\n{ABSTRACT}")
|
|
|
|
|
|
|
37 |
|
38 |
-
|
39 |
-
textbox = gr.Textbox(placeholder="Enter a prompt")
|
40 |
-
|
41 |
-
textbox.submit(chat, textbox, chatbot)
|
42 |
|
43 |
demo.queue(api_open=False).launch()
|
|
|
32 |
response += word + " "
|
33 |
yield [(user_input, response)]
|
34 |
|
35 |
+
with gr.Blocks(css = """#col_container {width: 700px; margin-left: auto; margin-right: auto;}
|
36 |
+
#chatbot {height: 400px; overflow: auto;}""") as demo:
|
37 |
gr.Markdown(f"## {TITLE}\n\n\n\n{ABSTRACT}")
|
38 |
+
with gr.Column(elem_id='col_container'):
|
39 |
+
chatbot = gr.Chatbot(elem_id='chatbot')
|
40 |
+
textbox = gr.Textbox(placeholder="Enter a prompt")
|
41 |
|
42 |
+
textbox.submit(chat, textbox, chatbot)
|
|
|
|
|
|
|
43 |
|
44 |
demo.queue(api_open=False).launch()
|