Spaces:
Paused
Paused
Update app.py via AI Editor
Browse files
app.py
CHANGED
@@ -95,7 +95,7 @@ def markdown_table_to_df(md_table):
|
|
95 |
|
96 |
def markdown_table_preview(md_text):
|
97 |
if not md_text:
|
98 |
-
return html.Div()
|
99 |
tables = extract_markdown_tables(md_text)
|
100 |
if not tables:
|
101 |
return html.Div()
|
@@ -547,8 +547,10 @@ def combined_callback(
|
|
547 |
else:
|
548 |
preview = markdown_narrative_preview(generated_doc)
|
549 |
logging.info("Document preview updated.")
|
550 |
-
|
|
|
551 |
|
|
|
552 |
return files_display, new_shred, markdown_table_preview(new_shred), loading_msg, generated_doc
|
553 |
|
554 |
@app.callback(
|
|
|
95 |
|
96 |
def markdown_table_preview(md_text):
|
97 |
if not md_text:
|
98 |
+
return html.Div()
|
99 |
tables = extract_markdown_tables(md_text)
|
100 |
if not tables:
|
101 |
return html.Div()
|
|
|
547 |
else:
|
548 |
preview = markdown_narrative_preview(generated_doc)
|
549 |
logging.info("Document preview updated.")
|
550 |
+
# Always update document-preview, even if file-list/store-shred do not change
|
551 |
+
return files_display, new_shred, preview, "", generated_doc
|
552 |
|
553 |
+
# Always show preview for current shred if nothing else triggered
|
554 |
return files_display, new_shred, markdown_table_preview(new_shred), loading_msg, generated_doc
|
555 |
|
556 |
@app.callback(
|