Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -584,9 +584,9 @@ if canvas_result.json_data is not None:
|
|
584 |
|
585 |
# Calculate overall sensations
|
586 |
pain_level = pain * measured_pressure * touch_pressure
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
|
591 |
# Proprioception (sense of body position)
|
592 |
proprioception = proprioception_sens * np.linalg.norm([touch_x - AVATAR_WIDTH/2, touch_y - AVATAR_HEIGHT/2]) / (AVATAR_WIDTH/2)
|
@@ -599,7 +599,7 @@ if canvas_result.json_data is not None:
|
|
599 |
|
600 |
# Neural network simulation
|
601 |
neural_inputs = [pain_level, pleasure_level, measured_pressure, measured_temp, measured_em, tickle_level, itch_level, proprioception]
|
602 |
-
|
603 |
|
604 |
|
605 |
|
|
|
584 |
|
585 |
# Calculate overall sensations
|
586 |
pain_level = pain * measured_pressure * touch_pressure
|
587 |
+
pleasure_level = pleasure * (measured_temp - 37) / 10
|
588 |
+
tickle_level = tickle_sens * (1 - np.exp(-touch_duration / 0.5))
|
589 |
+
itch_level = itch_sens * (1 - np.exp(-touch_duration / 1.5))
|
590 |
|
591 |
# Proprioception (sense of body position)
|
592 |
proprioception = proprioception_sens * np.linalg.norm([touch_x - AVATAR_WIDTH/2, touch_y - AVATAR_HEIGHT/2]) / (AVATAR_WIDTH/2)
|
|
|
599 |
|
600 |
# Neural network simulation
|
601 |
neural_inputs = [pain_level, pleasure_level, measured_pressure, measured_temp, measured_em, tickle_level, itch_level, proprioception]
|
602 |
+
neural_response = NeuralNetworkSimulator.process(neural_inputs)
|
603 |
|
604 |
|
605 |
|