Update app.py
Browse files
app.py
CHANGED
@@ -114,7 +114,8 @@ 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 |
-
|
|
|
118 |
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>"
|
119 |
for k, v in results_dict.items():
|
120 |
if k in ["Hemoglobin", "WBC Count", "Platelets"]:
|
@@ -124,7 +125,7 @@ def app():
|
|
124 |
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>"
|
125 |
table_html += "</table>"
|
126 |
|
127 |
-
|
128 |
<div style='margin-top:20px;padding:12px;border:1px dashed #999;background:#f9f9f9;'>
|
129 |
<h4>📝 Summary in Your Language</h4>
|
130 |
<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;'>""" 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"]:
|
|
|
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>
|