Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -184,8 +184,12 @@ def analyze_face(image):
|
|
184 |
|
185 |
summary = "<ul><li>Your hemoglobin is a bit low — this could mean mild anemia.</li><li>Low iron storage detected — consider an iron profile test.</li><li>Elevated bilirubin — possible jaundice. Recommend LFT.</li><li>High HbA1c — prediabetes indication. Recommend glucose check.</li><li>Low SpO₂ — suggest retesting with a pulse oximeter.</li></ul>"
|
186 |
|
|
|
|
|
|
|
|
|
187 |
# Generate Health Card HTML
|
188 |
-
health_card_html = build_health_card(
|
189 |
return health_card_html, frame_rgb
|
190 |
|
191 |
# Create Gradio interface
|
|
|
184 |
|
185 |
summary = "<ul><li>Your hemoglobin is a bit low — this could mean mild anemia.</li><li>Low iron storage detected — consider an iron profile test.</li><li>Elevated bilirubin — possible jaundice. Recommend LFT.</li><li>High HbA1c — prediabetes indication. Recommend glucose check.</li><li>Low SpO₂ — suggest retesting with a pulse oximeter.</li></ul>"
|
186 |
|
187 |
+
# Convert frame_rgb to base64 for profile picture (this is temporary placeholder)
|
188 |
+
_, buffer = cv2.imencode('.png', frame_rgb)
|
189 |
+
profile_image_base64 = base64.b64encode(buffer).decode('utf-8')
|
190 |
+
|
191 |
# Generate Health Card HTML
|
192 |
+
health_card_html = build_health_card(profile_image_base64, test_results, summary)
|
193 |
return health_card_html, frame_rgb
|
194 |
|
195 |
# Create Gradio interface
|