RathodHarish commited on
Commit
b980344
·
verified ·
1 Parent(s): 7ec4995

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -406,7 +406,7 @@ def create_anomaly_alerts_chart(anomalies_df):
406
  x='date',
407
  y='anomaly_count',
408
  title="Anomaly Alerts Over Time",
409
- labels{"date": "Date", "anomaly_count": "Number of Anomalies"}
410
  )
411
  fig.update_layout(title_font_size=16, margin=dict(l=20, r=20, t=40, b=20))
412
  return fig
@@ -620,7 +620,7 @@ async def process_logs(file_obj, lab_site_filter, equipment_type_filter, date_ra
620
  if elapsed_time > 3:
621
  logging.warning(f"Processing time exceeded 3 seconds: {elapsed_time:.2f} seconds")
622
 
623
- return (summary, preview_html, usage_chart, device_cards, daily_log_chart, weekly_uptime_chart, anomaly_alerts_chart, downtime_chart, anomalies, amc_reminders, insights, None, df, current_modified_time)
624
  except Exception as e:
625
  logging.error(f"Failed to process file: {str(e)}")
626
  return f"Error: {str(e)}", "<p>Error processing data.</p>", None, '<p>Error processing data.</p>', None, None, None, None, "", "", "", None, cached_df_state, last_modified_state
 
406
  x='date',
407
  y='anomaly_count',
408
  title="Anomaly Alerts Over Time",
409
+ labels={"date": "Date", "anomaly_count": "Number of Anomalies"} # Fixed syntax error here
410
  )
411
  fig.update_layout(title_font_size=16, margin=dict(l=20, r=20, t=40, b=20))
412
  return fig
 
620
  if elapsed_time > 3:
621
  logging.warning(f"Processing time exceeded 3 seconds: {elapsed_time:.2f} seconds")
622
 
623
+ return (summary, preview_html, usage_chart, device_cards, daily_log_chart, weekly_uptime_output, anomaly_alerts_output, downtime_chart_output, anomaly_output, amc_output, insights_output, pdf_output, df, current_modified_time)
624
  except Exception as e:
625
  logging.error(f"Failed to process file: {str(e)}")
626
  return f"Error: {str(e)}", "<p>Error processing data.</p>", None, '<p>Error processing data.</p>', None, None, None, None, "", "", "", None, cached_df_state, last_modified_state