Sephfox commited on
Commit
f862c72
·
verified ·
1 Parent(s): 9699023

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -579,12 +579,12 @@ def create_avatar():
579
  return img
580
 
581
  # Adjust alpha channel of heatmap
582
- data = np.array(heatmap_img)
583
- data[:, :, 3] = data[:, :, 3] * 0.5 # Reduce opacity to 50%
584
- heatmap_img = Image.fromarray(data)
585
 
586
- combined_img = Image.alpha_composite(avatar_img.convert('RGBA'), heatmap_img)
587
- return combined_img
588
 
589
  # Create and display avatar with heatmap
590
  st.subheader("Avatar with Sensation Heatmap")
 
579
  return img
580
 
581
  # Adjust alpha channel of heatmap
582
+ data = np.array(heatmap_img)
583
+ data[:, :, 3] = data[:, :, 3] * 0.5 # Reduce opacity to 50%
584
+ heatmap_img = Image.fromarray(data)
585
 
586
+ combined_img = Image.alpha_composite(avatar_img.convert('RGBA'), heatmap_img)
587
+ return combined_img
588
 
589
  # Create and display avatar with heatmap
590
  st.subheader("Avatar with Sensation Heatmap")