bluenevus commited on
Commit
46e47d9
·
verified ·
1 Parent(s): b991deb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -627,7 +627,7 @@ def download_loe(n_clicks, loe_output):
627
  from dash import callback_context
628
 
629
  @app.callback(
630
- Output('loe-output', 'children'),
631
  Input('generate-loe', 'n_clicks'),
632
  Input('upload-loe', 'contents'),
633
  State('upload-loe', 'filename'),
@@ -639,8 +639,8 @@ def update_loe_output(n_clicks, upload_contents, upload_filename, shred_output):
639
  triggered_id = ctx.triggered[0]['prop_id'].split('.')[0]
640
 
641
  if not ctx.triggered:
642
- return "Click 'Generate LOE' to begin."
643
-
644
  try:
645
  if triggered_id in ['generate-loe', 'upload-loe']:
646
  if upload_contents:
@@ -664,7 +664,7 @@ def update_loe_output(n_clicks, upload_contents, upload_filename, shred_output):
664
  )
665
  ]
666
  else:
667
- return "Click 'Generate LOE' to begin."
668
  except Exception as e:
669
  return f"An error occurred: {str(e)}"
670
 
 
627
  from dash import callback_context
628
 
629
  @app.callback(
630
+ Output('loe-output', 'children', allow_duplicate=True),
631
  Input('generate-loe', 'n_clicks'),
632
  Input('upload-loe', 'contents'),
633
  State('upload-loe', 'filename'),
 
639
  triggered_id = ctx.triggered[0]['prop_id'].split('.')[0]
640
 
641
  if not ctx.triggered:
642
+ return dash.no_update
643
+
644
  try:
645
  if triggered_id in ['generate-loe', 'upload-loe']:
646
  if upload_contents:
 
664
  )
665
  ]
666
  else:
667
+ return dash.no_update
668
  except Exception as e:
669
  return f"An error occurred: {str(e)}"
670