Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -305,53 +305,53 @@ with col2:
|
|
305 |
"""
|
306 |
st.code(data_display, language="")
|
307 |
# First, create a template string with placeholders
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
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
|
|
|
305 |
"""
|
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
|