Sephfox commited on
Commit
f9cb84b
·
verified ·
1 Parent(s): 7e589f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -24
app.py CHANGED
@@ -576,9 +576,9 @@ if uploaded_file is not None:
576
  show_heatmap = st.checkbox("Show Sensation Heatmap", value=True)
577
 
578
  if st.button("Simulate Interaction"):
579
- # Simulate interaction at the clicked point
580
- if 'clicked_points' in locals() and clicked_points:
581
- touch_x, touch_y = clicked_points[-1]
582
 
583
  sensation = sensation_map[touch_y, touch_x]
584
  (
@@ -629,27 +629,28 @@ if uploaded_file is not None:
629
  average_pressure = np.mean(sensation_map[:, :, 2])
630
 
631
  # Create a futuristic data display
632
- data_display = (
633
- "```\n"
634
- "+---------------------------------------------+\n"
635
- f"| Pressure : {average_pressure:.2f}".ljust(45) + "|\n"
636
- f"| Temperature : {np.mean(sensation_map[:, :, 3]):.2f}°C".ljust(45) + "|\n"
637
- f"| Texture : {np.mean(sensation_map[:, :, 4]):.2f}".ljust(45) + "|\n"
638
- f"| EM Field : {np.mean(sensation_map[:, :, 5]):.2f} μT".ljust(45) + "|\n"
639
- f"| Quantum State: {np.mean(sensation_map[:, :, 8]):.2f}".ljust(45) + "|\n"
640
- "+---------------------------------------------+\n"
641
- f"| Pain Level : {np.mean(sensation_map[:, :, 0]):.2f}".ljust(45) + "|\n"
642
- f"| Pleasure : {np.mean(sensation_map[:, :, 1]):.2f}".ljust(45) + "|\n"
643
- f"| Tickle : {np.mean(sensation_map[:, :, 6]):.2f}".ljust(45) + "|\n"
644
- f"| Itch : {np.mean(sensation_map[:, :, 7]):.2f}".ljust(45) + "|\n"
645
- f"| Proprioception: {np.mean(sensation_map[:, :, 10]):.2f}".ljust(44) + "|\n"
646
- f"| Synesthesia : {np.mean(sensation_map[:, :, 11]):.2f}".ljust(45) + "|\n"
647
- f"| Neural Response: {np.mean(sensation_map[:, :, 9]):.2f}".ljust(43) + "|\n"
648
- "+---------------------------------------------+\n"
649
- "```"
650
- )
651
-
652
- st.code(data_display, language="")
 
653
 
654
  # Generate description
655
  prompt = (
 
576
  show_heatmap = st.checkbox("Show Sensation Heatmap", value=True)
577
 
578
  if st.button("Simulate Interaction"):
579
+ # Simulate interaction at the clicked point
580
+ if 'clicked_points' in locals() and clicked_points:
581
+ touch_x, touch_y = clicked_points[-1]
582
 
583
  sensation = sensation_map[touch_y, touch_x]
584
  (
 
629
  average_pressure = np.mean(sensation_map[:, :, 2])
630
 
631
  # Create a futuristic data display
632
+ data_display = (
633
+ "```\n"
634
+ "+---------------------------------------------+\n"
635
+ f"| Pressure : {average_pressure:.2f}".ljust(45) + "|\n"
636
+ f"| Temperature : {np.mean(sensation_map[:, :, 3]):.2f}°C".ljust(45) + "|\n"
637
+ f"| Texture : {np.mean(sensation_map[:, :, 4]):.2f}".ljust(45) + "|\n"
638
+ f"| EM Field : {np.mean(sensation_map[:, :, 5]):.2f} μT".ljust(45) + "|\n"
639
+ f"| Quantum State: {np.mean(sensation_map[:, :, 8]):.2f}".ljust(45) + "|\n"
640
+ "+---------------------------------------------+\n"
641
+ f"| Location: ({touch_x:.1f}, {touch_y:.1f})".ljust(45) + "|\n"
642
+ f"| Pain Level : {np.mean(sensation_map[:, :, 0]):.2f}".ljust(45) + "|\n"
643
+ f"| Pleasure : {np.mean(sensation_map[:, :, 1]):.2f}".ljust(45) + "|\n"
644
+ f"| Tickle : {np.mean(sensation_map[:, :, 6]):.2f}".ljust(45) + "|\n"
645
+ f"| Itch : {np.mean(sensation_map[:, :, 7]):.2f}".ljust(45) + "|\n"
646
+ f"| Proprioception: {np.mean(sensation_map[:, :, 10]):.2f}".ljust(44) + "|\n"
647
+ f"| Synesthesia : {np.mean(sensation_map[:, :, 11]):.2f}".ljust(45) + "|\n"
648
+ f"| Neural Response: {np.mean(sensation_map[:, :, 9]):.2f}".ljust(43) + "|\n"
649
+ "+---------------------------------------------+\n"
650
+ "```"
651
+ )
652
+
653
+ st.code(data_display, language="")
654
 
655
  # Generate description
656
  prompt = (