Spaces:
Paused
Paused
Update app.py via AI Editor
Browse files
app.py
CHANGED
|
@@ -265,7 +265,6 @@ def process_document(sess_data, action, selected_filename=None, chat_input=None,
|
|
| 265 |
proposal_content = None
|
| 266 |
proposal_fileid = None
|
| 267 |
|
| 268 |
-
# Always find document and proposal content if possible
|
| 269 |
if selected_filename and selected_filename in sess_data["uploaded_documents"]:
|
| 270 |
doc_content = sess_data["uploaded_documents"][selected_filename]
|
| 271 |
doc_fileid = sess_data["uploaded_documents_fileid"].get(selected_filename)
|
|
@@ -602,7 +601,7 @@ app.layout = dbc.Container([
|
|
| 602 |
id="output-preview-container",
|
| 603 |
children=html.Div(id="output-data-upload"),
|
| 604 |
style={
|
| 605 |
-
"height": "
|
| 606 |
"overflowY": "auto",
|
| 607 |
"overflowX": "auto",
|
| 608 |
}
|
|
@@ -635,28 +634,6 @@ app.clientside_callback(
|
|
| 635 |
Input('dummy-url', 'pathname')
|
| 636 |
)
|
| 637 |
|
| 638 |
-
@app.callback(
|
| 639 |
-
Output('output-preview-container', 'style'),
|
| 640 |
-
[Input('preview-window-state', 'data')]
|
| 641 |
-
)
|
| 642 |
-
def update_preview_window_style(state):
|
| 643 |
-
if state == "shrunk":
|
| 644 |
-
return {
|
| 645 |
-
"maxHeight": "8em",
|
| 646 |
-
"overflow": "hidden",
|
| 647 |
-
"transition": "max-height 0.4s",
|
| 648 |
-
"border": "1px solid #ddd",
|
| 649 |
-
"borderRadius": "4px"
|
| 650 |
-
}
|
| 651 |
-
else:
|
| 652 |
-
return {
|
| 653 |
-
"maxHeight": "none",
|
| 654 |
-
"overflow": "visible",
|
| 655 |
-
"transition": "max-height 0.4s",
|
| 656 |
-
"border": "1px solid #ddd",
|
| 657 |
-
"borderRadius": "4px"
|
| 658 |
-
}
|
| 659 |
-
|
| 660 |
@app.callback(
|
| 661 |
Output('output-data-upload', 'children'),
|
| 662 |
Output('documents-list', 'children'),
|
|
|
|
| 265 |
proposal_content = None
|
| 266 |
proposal_fileid = None
|
| 267 |
|
|
|
|
| 268 |
if selected_filename and selected_filename in sess_data["uploaded_documents"]:
|
| 269 |
doc_content = sess_data["uploaded_documents"][selected_filename]
|
| 270 |
doc_fileid = sess_data["uploaded_documents_fileid"].get(selected_filename)
|
|
|
|
| 601 |
id="output-preview-container",
|
| 602 |
children=html.Div(id="output-data-upload"),
|
| 603 |
style={
|
| 604 |
+
"height": "70vh",
|
| 605 |
"overflowY": "auto",
|
| 606 |
"overflowX": "auto",
|
| 607 |
}
|
|
|
|
| 634 |
Input('dummy-url', 'pathname')
|
| 635 |
)
|
| 636 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 637 |
@app.callback(
|
| 638 |
Output('output-data-upload', 'children'),
|
| 639 |
Output('documents-list', 'children'),
|