VolodymyrHula commited on
Commit
642ca5c
·
1 Parent(s): 12d6bc9

Fixed endless scroll with parent component

Browse files
Files changed (1) hide show
  1. interface.py +5 -15
interface.py CHANGED
@@ -42,25 +42,18 @@ def clear_chat():
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,12 +93,9 @@ with gr.Blocks(css="""
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,
107
- max_lines=5,
108
- autofocus=True
109
  )
110
  with gr.Column(scale=1, min_width=100):
111
  send_button = gr.Button("Send", variant="primary")
 
42
 
43
 
44
  with gr.Blocks(css="""
45
+ #component-0 {
46
+ height: calc(100vh - 200px) !important;
47
  }
48
  #chatbot-container {
49
+ height: 100% !important;
50
  min-height: 600px;
 
51
  }
52
  #input-row {
53
  position: sticky;
54
  bottom: 0;
55
  background: white;
56
  padding: 10px 0;
 
 
 
 
 
 
57
  }
58
  .contain {
59
  max-width: 100% !important;
 
93
  with gr.Row(elem_id="input-row"):
94
  with gr.Column(scale=9):
95
  msg_input = gr.Textbox(
96
+ placeholder="Type your message here...",
97
  show_label=False,
98
+ container=False
 
 
 
99
  )
100
  with gr.Column(scale=1, min_width=100):
101
  send_button = gr.Button("Send", variant="primary")