Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -625,23 +625,26 @@ if st.button("Simulate Interaction"):
|
|
| 625 |
heatmap = create_heatmap(sensation_map, sensation_types.index("Pain"))
|
| 626 |
st.image(heatmap, use_column_width=True)
|
| 627 |
|
|
|
|
|
|
|
|
|
|
| 628 |
# Create a futuristic data display
|
| 629 |
data_display = (
|
| 630 |
"```\n"
|
| 631 |
"+---------------------------------------------+\n"
|
| 632 |
-
f"| Pressure : {
|
| 633 |
-
f"| Temperature : {
|
| 634 |
-
f"| Texture : {
|
| 635 |
-
f"| EM Field : {
|
| 636 |
-
f"| Quantum State: {
|
| 637 |
"+---------------------------------------------+\n"
|
| 638 |
-
f"| Pain Level : {
|
| 639 |
-
f"| Pleasure : {
|
| 640 |
-
f"| Tickle : {
|
| 641 |
-
f"| Itch : {
|
| 642 |
-
f"| Proprioception: {
|
| 643 |
-
f"| Synesthesia : {
|
| 644 |
-
f"| Neural Response: {
|
| 645 |
"+---------------------------------------------+\n"
|
| 646 |
"```"
|
| 647 |
)
|
|
|
|
| 625 |
heatmap = create_heatmap(sensation_map, sensation_types.index("Pain"))
|
| 626 |
st.image(heatmap, use_column_width=True)
|
| 627 |
|
| 628 |
+
# Calculate the average pressure value
|
| 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 |
)
|