Spaces:
Sleeping
Sleeping
Commit ·
12d6bc9
1
Parent(s): d77297e
Fixed endless scroll v2
Browse files- interface.py +11 -1
interface.py
CHANGED
|
@@ -42,15 +42,25 @@ def clear_chat():
|
|
| 42 |
|
| 43 |
|
| 44 |
with gr.Blocks(css="""
|
|
|
|
|
|
|
|
|
|
| 45 |
#chatbot-container {
|
| 46 |
height: calc(100vh - 200px) !important;
|
| 47 |
min-height: 600px;
|
|
|
|
| 48 |
}
|
| 49 |
#input-row {
|
| 50 |
position: sticky;
|
| 51 |
bottom: 0;
|
| 52 |
background: white;
|
| 53 |
padding: 10px 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
}
|
| 55 |
.contain {
|
| 56 |
max-width: 100% !important;
|
|
@@ -90,7 +100,7 @@ with gr.Blocks(css="""
|
|
| 90 |
with gr.Row(elem_id="input-row"):
|
| 91 |
with gr.Column(scale=9):
|
| 92 |
msg_input = gr.Textbox(
|
| 93 |
-
placeholder="Type your message here...",
|
| 94 |
show_label=False,
|
| 95 |
container=False,
|
| 96 |
lines=1,
|
|
|
|
| 42 |
|
| 43 |
|
| 44 |
with gr.Blocks(css="""
|
| 45 |
+
body, .gradio-container {
|
| 46 |
+
overflow: hidden !important;
|
| 47 |
+
}
|
| 48 |
#chatbot-container {
|
| 49 |
height: calc(100vh - 200px) !important;
|
| 50 |
min-height: 600px;
|
| 51 |
+
overflow-y: auto !important;
|
| 52 |
}
|
| 53 |
#input-row {
|
| 54 |
position: sticky;
|
| 55 |
bottom: 0;
|
| 56 |
background: white;
|
| 57 |
padding: 10px 0;
|
| 58 |
+
z-index: 10;
|
| 59 |
+
}
|
| 60 |
+
#input-row textarea {
|
| 61 |
+
max-height: 120px !important;
|
| 62 |
+
overflow-y: auto !important;
|
| 63 |
+
resize: none !important;
|
| 64 |
}
|
| 65 |
.contain {
|
| 66 |
max-width: 100% !important;
|
|
|
|
| 100 |
with gr.Row(elem_id="input-row"):
|
| 101 |
with gr.Column(scale=9):
|
| 102 |
msg_input = gr.Textbox(
|
| 103 |
+
placeholder="Type your message here... (Press Enter to send, Shift+Enter for new line)",
|
| 104 |
show_label=False,
|
| 105 |
container=False,
|
| 106 |
lines=1,
|