SuriRaja commited on
Commit
bba64cd
·
verified ·
1 Parent(s): 7d09b07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -114,9 +114,9 @@ def app():
114
  summary_text = "<li>Your hemoglobin is a bit low...</li><li>Consider iron tests.</li>" # Placeholder
115
  pdf_path = generate_pdf_report(image, results_dict, summary_text)
116
 
117
- table_html = """
118
- <table style='width:100%;border-collapse:collapse;margin-top:10px;'>""" style='width:100%;border-collapse:collapse;margin-top:10px;'>"
119
- table_html += "<tr><th style='border:1px solid #ccc;padding:6px;'>Test</th><th style='border:1px solid #ccc;padding:6px;'>Result</th><th style='border:1px solid #ccc;padding:6px;'>Status</th></tr>"
120
  for k, v in results_dict.items():
121
  if k in ["Hemoglobin", "WBC Count", "Platelets"]:
122
  status, icon, bg = get_risk_color(v, (13.5, 17.5) if k == "Hemoglobin" else (4.0, 11.0) if k == "WBC Count" else (150, 450))
@@ -125,7 +125,7 @@ def app():
125
  table_html += f"<tr><td style='border:1px solid #ccc;padding:6px;'>{k}</td><td style='border:1px solid #ccc;padding:6px;'>{v}</td><td style='border:1px solid #ccc;padding:6px;'>-</td></tr>"
126
  table_html += "</table>"
127
 
128
- summary_block = """
129
  <div style='margin-top:20px;padding:12px;border:1px dashed #999;background:#f9f9f9;'>
130
  <h4>📝 Summary in Your Language</h4>
131
  <details><summary><b>Hindi</b></summary>
 
114
  summary_text = "<li>Your hemoglobin is a bit low...</li><li>Consider iron tests.</li>" # Placeholder
115
  pdf_path = generate_pdf_report(image, results_dict, summary_text)
116
 
117
+ table_html = """
118
+ <table style='width:100%;border-collapse:collapse;margin-top:10px;'>
119
+ <tr><th style='border:1px solid #ccc;padding:6px;'>Test</th><th style='border:1px solid #ccc;padding:6px;'>Result</th><th style='border:1px solid #ccc;padding:6px;'>Status</th></tr>"""
120
  for k, v in results_dict.items():
121
  if k in ["Hemoglobin", "WBC Count", "Platelets"]:
122
  status, icon, bg = get_risk_color(v, (13.5, 17.5) if k == "Hemoglobin" else (4.0, 11.0) if k == "WBC Count" else (150, 450))
 
125
  table_html += f"<tr><td style='border:1px solid #ccc;padding:6px;'>{k}</td><td style='border:1px solid #ccc;padding:6px;'>{v}</td><td style='border:1px solid #ccc;padding:6px;'>-</td></tr>"
126
  table_html += "</table>"
127
 
128
+ summary_block = """
129
  <div style='margin-top:20px;padding:12px;border:1px dashed #999;background:#f9f9f9;'>
130
  <h4>📝 Summary in Your Language</h4>
131
  <details><summary><b>Hindi</b></summary>