Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -186,7 +186,7 @@ def analyze_face(image):
|
|
186 |
|
187 |
# Generate Health Card HTML
|
188 |
health_card_html = build_health_card("profile_image_placeholder_base64", test_results, summary)
|
189 |
-
return health_card_html
|
190 |
|
191 |
# Create Gradio interface
|
192 |
with gr.Blocks() as demo:
|
@@ -202,7 +202,8 @@ with gr.Blocks() as demo:
|
|
202 |
result_image = gr.Image(label="📷 Key Frame Snapshot")
|
203 |
|
204 |
def route_inputs(mode, image, video):
|
205 |
-
|
|
|
206 |
|
207 |
submit_btn.click(fn=route_inputs, inputs=[mode_selector, image_input, video_input], outputs=[result_html, result_image])
|
208 |
|
|
|
186 |
|
187 |
# Generate Health Card HTML
|
188 |
health_card_html = build_health_card("profile_image_placeholder_base64", test_results, summary)
|
189 |
+
return health_card_html, frame_rgb
|
190 |
|
191 |
# Create Gradio interface
|
192 |
with gr.Blocks() as demo:
|
|
|
202 |
result_image = gr.Image(label="📷 Key Frame Snapshot")
|
203 |
|
204 |
def route_inputs(mode, image, video):
|
205 |
+
health_card_html, frame_rgb = analyze_face(image) if mode == "Image" else analyze_face(video)
|
206 |
+
return health_card_html, frame_rgb
|
207 |
|
208 |
submit_btn.click(fn=route_inputs, inputs=[mode_selector, image_input, video_input], outputs=[result_html, result_image])
|
209 |
|