Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -484,8 +484,15 @@ def generate_ai_response(keypoints, sensation_map):
|
|
484 |
|
485 |
return response
|
486 |
|
487 |
-
#
|
488 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
|
490 |
uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
|
491 |
|
|
|
484 |
|
485 |
return response
|
486 |
|
487 |
+
# Create and display avatar with heatmap
|
488 |
+
st.subheader("Avatar with Sensation Heatmap")
|
489 |
+
|
490 |
+
# You need to define sensation_map and sensation_type before this
|
491 |
+
sensation_map = np.random.rand(AVATAR_HEIGHT 600, AVATAR_WIDTH, 300) # Example random sensation map
|
492 |
+
sensation_type = 0 # Example sensation type (0 for Pain)
|
493 |
+
|
494 |
+
avatar_with_heatmap = create_avatar_with_heatmap(sensation_map, sensation_type)
|
495 |
+
st.image(avatar_with_heatmap, use_column_width=True)
|
496 |
|
497 |
uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
|
498 |
|