Sephfox commited on
Commit
61986e1
·
verified ·
1 Parent(s): 5e831ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -42
app.py CHANGED
@@ -306,54 +306,48 @@ with col2:
306
  st.code(data_display, language="")
307
  # First, create a template string with placeholders
308
  prompt_template = """Human: Analyze the sensory input for a hyper-advanced AI humanoid:
309
- Location: ({touch_x:0.1f}, {touch_y:0.1f})
310
- Duration: {touch_duration:.1f}s, Intensity: {touch_pressure:.2f}
311
- Pressure: {measured_pressure:.2f}
312
- Temperature: {measured_temp:.2f}°C
313
- Texture: {measured_texture}
314
- EM Field: {measured_em:.2f} μT
315
- Quantum State: {quantum_state}
316
  Resulting in:
317
- Pain: {pain_level:.2f}, Pleasure: {pleasure_level:.2f}
318
- Tickle: {tickle_level:.2f}, Itch: {itch_level:.2f}
319
- Proprioception: {proprioception:.2f}
320
- Synesthesia: {synesthesia}
321
- Neural Response: {neural_response:.2f}
322
  Provide a detailed, scientific, and creative description of the AI humanoid's experience and response to this sensory input."""
323
 
324
  # First, format each value individually
325
- formatted_touch_x = f"{touch_x:0.1f}"
326
- formatted_touch_y = f"{touch_y:0.1f}"
327
- formatted_touch_duration = f"{touch_duration:.1f}"
328
- formatted_touch_pressure = f"{touch_pressure:.2f}"
329
- formatted_measured_pressure = f"{measured_pressure:.2f}"
330
- formatted_measured_temp = f"{measured_temp:.2f}"
331
- formatted_measured_em = f"{measured_em:.2f}"
332
- formatted_pain_level = f"{pain_level:.2f}"
333
- formatted_pleasure_level = f"{pleasure_level:.2f}"
334
- formatted_tickle_level = f"{tickle_level:.2f}"
335
- formatted_itch_level = f"{itch_level:.2f}"
336
- formatted_proprioception = f"{proprioception:.2f}"
337
- formatted_neural_response = f"{neural_response:.2f}"
338
 
339
  # Then, create the prompt using these pre-formatted values
340
- prompt = f"""Human: Analyze the sensory input for a hyper-advanced AI humanoid:
341
- Location: ({formatted_touch_x}, {formatted_touch_y})
342
- Duration: {formatted_touch_duration}s, Intensity: {formatted_touch_pressure}
343
- Pressure: {formatted_measured_pressure}
344
- Temperature: {formatted_measured_temp}°C
345
- Texture: {measured_texture}
346
- EM Field: {formatted_measured_em} μT
347
- Quantum State: {quantum_state}
348
- Resulting in:
349
- Pain: {formatted_pain_level}, Pleasure: {formatted_pleasure_level}
350
- Tickle: {formatted_tickle_level}, Itch: {formatted_itch_level}
351
- Proprioception: {formatted_proprioception}
352
- Synesthesia: {synesthesia}
353
- Neural Response: {formatted_neural_response}
354
- Provide a detailed, scientific, and creative description of the AI humanoid's experience and response to this sensory input."""
355
-
356
- # You can use this prompt to generate a response from your AI model
357
  # For demonstration, let's create a mock AI response
358
  ai_response = f"""Based on the complex sensory input received, the hyper-advanced AI humanoid is experiencing a multifaceted neural response:
359
 
 
306
  st.code(data_display, language="")
307
  # First, create a template string with placeholders
308
  prompt_template = """Human: Analyze the sensory input for a hyper-advanced AI humanoid:
309
+ Location: ({}, {})
310
+ Duration: {}s, Intensity: {}
311
+ Pressure: {}
312
+ Temperature: {}°C
313
+ Texture: {}
314
+ EM Field: {} μT
315
+ Quantum State: {}
316
  Resulting in:
317
+ Pain: {}, Pleasure: {}
318
+ Tickle: {}, Itch: {}
319
+ Proprioception: {}
320
+ Synesthesia: {}
321
+ Neural Response: {}
322
  Provide a detailed, scientific, and creative description of the AI humanoid's experience and response to this sensory input."""
323
 
324
  # First, format each value individually
325
+ touch_x_str = f"{touch_x:.1f}"
326
+ touch_y_str = f"{touch_y:.1f}"
327
+ touch_duration_str = f"{touch_duration:.1f}"
328
+ touch_pressure_str = f"{touch_pressure:.2f}"
329
+ measured_pressure_str = f"{measured_pressure:.2f}"
330
+ measured_temp_str = f"{measured_temp:.2f}"
331
+ measured_em_str = f"{measured_em:.2f}"
332
+ pain_level_str = f"{pain_level:.2f}"
333
+ pleasure_level_str = f"{pleasure_level:.2f}"
334
+ tickle_level_str = f"{tickle_level:.2f}"
335
+ itch_level_str = f"{itch_level:.2f}"
336
+ proprioception_str = f"{proprioception:.2f}"
337
+ neural_response_str = f"{neural_response:.2f}"
338
 
339
  # Then, create the prompt using these pre-formatted values
340
+ prompt = prompt_template.format(
341
+ touch_x_str, touch_y_str,
342
+ touch_duration_str, touch_pressure_str,
343
+ measured_pressure_str, measured_temp_str,
344
+ measured_texture, measured_em_str, quantum_state,
345
+ pain_level_str, pleasure_level_str,
346
+ tickle_level_str, itch_level_str,
347
+ proprioception_str, synesthesia, neural_response_str
348
+ )
349
+
350
+ # You can use this prompt to generate a response from your AI model
 
 
 
 
 
 
351
  # For demonstration, let's create a mock AI response
352
  ai_response = f"""Based on the complex sensory input received, the hyper-advanced AI humanoid is experiencing a multifaceted neural response:
353