Update app.py
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ 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 +124,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>
|
@@ -134,6 +134,10 @@ def app():
|
|
134 |
<ul><li>మీ హిమోగ్లోబిన్ తక్కువగా ఉంది — ఇది అనీమియా సూచించవచ్చు. CBC, Iron పరీక్షలు చేయించండి.</li></ul>
|
135 |
</details>
|
136 |
</div>"""
|
|
|
|
|
|
|
|
|
137 |
|
138 |
full_html = table_html + summary_block
|
139 |
return full_html, frame_rgb, pdf_path
|
|
|
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 = "<table style='width:100%;border-collapse:collapse;margin-top:10px;'>"
|
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 |
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 |
+
summary_block = """
|
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>
|
|
|
134 |
<ul><li>మీ హిమోగ్లోబిన్ తక్కువగా ఉంది — ఇది అనీమియా సూచించవచ్చు. CBC, Iron పరీక్షలు చేయించండి.</li></ul>
|
135 |
</details>
|
136 |
</div>"""
|
137 |
+
<details><summary><b>Telugu</b></summary>
|
138 |
+
<ul><li>మీ హిమోగ్లోబిన్ తక్కువగా ఉంది — ఇది అనీమియా సూచించవచ్చు. CBC, Iron పరీక్షలు చేయించండి.</li></ul>
|
139 |
+
</details>
|
140 |
+
</div>"""
|
141 |
|
142 |
full_html = table_html + summary_block
|
143 |
return full_html, frame_rgb, pdf_path
|