Spaces:
Paused
Paused
Update app.py via AI Editor
Browse files
app.py
CHANGED
@@ -231,7 +231,7 @@ def left_navbar_static():
|
|
231 |
], style={"padding": "1rem", "backgroundColor": "#f8f9fa", "height": "100vh", "overflowY": "auto"})
|
232 |
|
233 |
def chat_box_card():
|
234 |
-
#
|
235 |
return dbc.Card(
|
236 |
dbc.CardBody([
|
237 |
html.Div(
|
@@ -251,7 +251,9 @@ def chat_box_card():
|
|
251 |
]),
|
252 |
className="mt-3",
|
253 |
style={
|
254 |
-
"height": "62vh"
|
|
|
|
|
255 |
}
|
256 |
)
|
257 |
|
@@ -281,13 +283,20 @@ def user_input_card():
|
|
281 |
)
|
282 |
|
283 |
def right_main_static():
|
|
|
284 |
return html.Div([
|
285 |
-
|
286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
dcc.Loading(id="loading", type="default", fullscreen=False, style={"position": "absolute", "top": "5%", "left": "50%"}),
|
288 |
dcc.Interval(id="stream-interval", interval=400, n_intervals=0, disabled=True, max_intervals=1000),
|
289 |
dcc.Store(id="client-question", data="")
|
290 |
-
], style={"padding": "1rem", "backgroundColor": "#fff", "height": "100vh", "overflowY": "auto"})
|
291 |
|
292 |
app.layout = html.Div([
|
293 |
dcc.Store(id="session-id", storage_type="local"),
|
|
|
231 |
], style={"padding": "1rem", "backgroundColor": "#f8f9fa", "height": "100vh", "overflowY": "auto"})
|
232 |
|
233 |
def chat_box_card():
|
234 |
+
# Only the chat-window div should be scrollable
|
235 |
return dbc.Card(
|
236 |
dbc.CardBody([
|
237 |
html.Div(
|
|
|
251 |
]),
|
252 |
className="mt-3",
|
253 |
style={
|
254 |
+
"height": "62vh",
|
255 |
+
"display": "flex",
|
256 |
+
"flexDirection": "column"
|
257 |
}
|
258 |
)
|
259 |
|
|
|
283 |
)
|
284 |
|
285 |
def right_main_static():
|
286 |
+
# The chat message area gets its own container/card with its own scrollbar
|
287 |
return html.Div([
|
288 |
+
html.Div(
|
289 |
+
chat_box_card(),
|
290 |
+
style={"width": "100%"}
|
291 |
+
),
|
292 |
+
html.Div(
|
293 |
+
user_input_card(),
|
294 |
+
style={"width": "100%", "marginTop": "1.5rem"}
|
295 |
+
),
|
296 |
dcc.Loading(id="loading", type="default", fullscreen=False, style={"position": "absolute", "top": "5%", "left": "50%"}),
|
297 |
dcc.Interval(id="stream-interval", interval=400, n_intervals=0, disabled=True, max_intervals=1000),
|
298 |
dcc.Store(id="client-question", data="")
|
299 |
+
], style={"padding": "1rem", "backgroundColor": "#fff", "height": "100vh", "overflowY": "auto", "display": "flex", "flexDirection": "column", "justifyContent": "flex-start"})
|
300 |
|
301 |
app.layout = html.Div([
|
302 |
dcc.Store(id="session-id", storage_type="local"),
|