Constrain chatbot height
Browse files
app.py
CHANGED
|
@@ -324,8 +324,7 @@ def update_foo(widget, state):
|
|
| 324 |
return state
|
| 325 |
|
| 326 |
|
| 327 |
-
|
| 328 |
-
with gr.Blocks(css="#chatbot-row {max-height: 400px}") as block:
|
| 329 |
llm_state = gr.State()
|
| 330 |
history_state = gr.State()
|
| 331 |
chain_state = gr.State()
|
|
@@ -354,7 +353,7 @@ with gr.Blocks(css="#chatbot-row {max-height: 400px}") as block:
|
|
| 354 |
openai_api_key_textbox = gr.Textbox(placeholder="Paste your OpenAI API key (sk-...)",
|
| 355 |
show_label=False, lines=1, type='password')
|
| 356 |
|
| 357 |
-
with gr.Row(
|
| 358 |
with gr.Column(scale=1, min_width=240):
|
| 359 |
my_file = gr.File(label="Upload a file", type="file", visible=False)
|
| 360 |
tmp_file = gr.File("videos/Masahiro.mp4", visible=False)
|
|
@@ -366,8 +365,8 @@ with gr.Blocks(css="#chatbot-row {max-height: 400px}") as block:
|
|
| 366 |
trace_chain_cb.change(update_foo, inputs=[trace_chain_cb, trace_chain_state],
|
| 367 |
outputs=[trace_chain_state])
|
| 368 |
|
| 369 |
-
with gr.Column(scale=3):
|
| 370 |
-
|
| 371 |
|
| 372 |
with gr.Row():
|
| 373 |
message = gr.Textbox(label="What's on your mind??",
|
|
|
|
| 324 |
return state
|
| 325 |
|
| 326 |
|
| 327 |
+
with gr.Blocks(css=".gradio-container {background-color: lightgray}") as block:
|
|
|
|
| 328 |
llm_state = gr.State()
|
| 329 |
history_state = gr.State()
|
| 330 |
chain_state = gr.State()
|
|
|
|
| 353 |
openai_api_key_textbox = gr.Textbox(placeholder="Paste your OpenAI API key (sk-...)",
|
| 354 |
show_label=False, lines=1, type='password')
|
| 355 |
|
| 356 |
+
with gr.Row():
|
| 357 |
with gr.Column(scale=1, min_width=240):
|
| 358 |
my_file = gr.File(label="Upload a file", type="file", visible=False)
|
| 359 |
tmp_file = gr.File("videos/Masahiro.mp4", visible=False)
|
|
|
|
| 365 |
trace_chain_cb.change(update_foo, inputs=[trace_chain_cb, trace_chain_state],
|
| 366 |
outputs=[trace_chain_state])
|
| 367 |
|
| 368 |
+
# with gr.Column(scale=3):
|
| 369 |
+
chatbot = gr.Chatbot()
|
| 370 |
|
| 371 |
with gr.Row():
|
| 372 |
message = gr.Textbox(label="What's on your mind??",
|