lavanya121 commited on
Commit
4c4a388
·
verified ·
1 Parent(s): 918968e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -65,7 +65,6 @@ def check_amc_reminders(df, current_date):
65
  reminders = df[(df["days_to_amc"] >= 0) & (df["days_to_amc"] <= 30)][["device_id", "log_type", "status", "timestamp", "usage_hours", "downtime", "amc_date"]]
66
  if reminders.empty:
67
  return "No AMC reminders due within the next 30 days.", reminders
68
- # Modified to include all reminders, not just the first 5
69
  reminder_text = "\n".join([f"- Device ID: {row['device_id']}, AMC Date: {row['amc_date'].strftime('%Y-%m-%d')}" for _, row in reminders.iterrows()])
70
  return reminder_text, reminders
71
  except Exception as e:
@@ -523,7 +522,7 @@ try:
523
 
524
  pdf_button.click(
525
  fn=generate_pdf,
526
- inputs=[summary_output, preview_html, usage_chart_output, device_cards_output, daily_log_trends_output, weekly_uptime_output, anomaly_alerts_output, downtime_chart_output, anomaly_output, amc_output, insights_output],
527
  outputs=[pdf_output]
528
  )
529
 
 
65
  reminders = df[(df["days_to_amc"] >= 0) & (df["days_to_amc"] <= 30)][["device_id", "log_type", "status", "timestamp", "usage_hours", "downtime", "amc_date"]]
66
  if reminders.empty:
67
  return "No AMC reminders due within the next 30 days.", reminders
 
68
  reminder_text = "\n".join([f"- Device ID: {row['device_id']}, AMC Date: {row['amc_date'].strftime('%Y-%m-%d')}" for _, row in reminders.iterrows()])
69
  return reminder_text, reminders
70
  except Exception as e:
 
522
 
523
  pdf_button.click(
524
  fn=generate_pdf,
525
+ inputs=[summary_output, preview_output, usage_chart_output, device_cards_output, daily_log_trends_output, weekly_uptime_output, anomaly_alerts_output, downtime_chart_output, anomaly_output, amc_output, insights_output],
526
  outputs=[pdf_output]
527
  )
528