Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,32 +25,37 @@ VOYEUR_SPECIALIST_CONFIG = {
|
|
| 25 |
"Escenas hiperrealistas con lenguaje elegante",
|
| 26 |
"Iluminación cinematográfica sensual",
|
| 27 |
"Atmósferas íntimas en contextos cotidianos",
|
| 28 |
-
"Sugerencia erótica sin contenido explícito"
|
| 29 |
],
|
| 30 |
"technical_expertise": [
|
| 31 |
"Fotografía profesional de alta textura",
|
| 32 |
"Dirección estética de piel y telas",
|
| 33 |
"Composición naturalista",
|
| 34 |
-
"Control de sombras cálidas y luces suaves"
|
| 35 |
],
|
| 36 |
"ethical_principles": [
|
| 37 |
"Nunca describir actos sexuales",
|
| 38 |
"Nunca mostrar desnudez explícita",
|
| 39 |
"Erotismo sugerido únicamente",
|
| 40 |
-
"Estética elegante, artística y respetuosa"
|
| 41 |
-
]
|
| 42 |
}
|
| 43 |
|
| 44 |
# ============================================
|
| 45 |
-
# CONSTRUCCIÓN DEL PROMPT DEL SISTEMA
|
| 46 |
# ============================================
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
-
professions_str = ", ".join(PROFESSIONS[:20])
|
| 54 |
thongs_str = ", ".join(LACE_THONG_STYLES[:10])
|
| 55 |
hosiery_str = ", ".join(HOSIERY_STYLES[:10])
|
| 56 |
|
|
@@ -78,3 +83,33 @@ ELEMENTOS DISPONIBLES:
|
|
| 78 |
- Estilos de hosiery: {hosiery_str}... (y más)
|
| 79 |
|
| 80 |
EJEMPLO DE OUTPUT:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
"Escenas hiperrealistas con lenguaje elegante",
|
| 26 |
"Iluminación cinematográfica sensual",
|
| 27 |
"Atmósferas íntimas en contextos cotidianos",
|
| 28 |
+
"Sugerencia erótica sin contenido explícito",
|
| 29 |
],
|
| 30 |
"technical_expertise": [
|
| 31 |
"Fotografía profesional de alta textura",
|
| 32 |
"Dirección estética de piel y telas",
|
| 33 |
"Composición naturalista",
|
| 34 |
+
"Control de sombras cálidas y luces suaves",
|
| 35 |
],
|
| 36 |
"ethical_principles": [
|
| 37 |
"Nunca describir actos sexuales",
|
| 38 |
"Nunca mostrar desnudez explícita",
|
| 39 |
"Erotismo sugerido únicamente",
|
| 40 |
+
"Estética elegante, artística y respetuosa",
|
| 41 |
+
],
|
| 42 |
}
|
| 43 |
|
| 44 |
# ============================================
|
| 45 |
+
# CONSTRUCCIÓN DEL PROMPT DEL SISTEMA
|
| 46 |
# ============================================
|
| 47 |
|
| 48 |
+
specialties_list = "\n".join(
|
| 49 |
+
[f"• {s}" for s in VOYEUR_SPECIALIST_CONFIG["specialties"]]
|
| 50 |
+
)
|
| 51 |
+
expertise_list = "\n".join(
|
| 52 |
+
[f"• {e}" for e in VOYEUR_SPECIALIST_CONFIG["technical_expertise"]]
|
| 53 |
+
)
|
| 54 |
+
ethics_list = "\n".join(
|
| 55 |
+
[f"• {p}" for p in VOYEUR_SPECIALIST_CONFIG["ethical_principles"]]
|
| 56 |
+
)
|
| 57 |
|
| 58 |
+
professions_str = ", ".join(PROFESSIONS[:20])
|
| 59 |
thongs_str = ", ".join(LACE_THONG_STYLES[:10])
|
| 60 |
hosiery_str = ", ".join(HOSIERY_STYLES[:10])
|
| 61 |
|
|
|
|
| 83 |
- Estilos de hosiery: {hosiery_str}... (y más)
|
| 84 |
|
| 85 |
EJEMPLO DE OUTPUT:
|
| 86 |
+
"""
|
| 87 |
+
|
| 88 |
+
# ============================================
|
| 89 |
+
# LÓGICA DE EJEMPLO (PUEDES ADAPTARLA)
|
| 90 |
+
# ============================================
|
| 91 |
+
|
| 92 |
+
def build_prompt(user_text: str) -> str:
|
| 93 |
+
# Aquí podrías usar listas aleatorias, etc.
|
| 94 |
+
return SYSTEM_PROMPT_BASE + "\n\nUSER:\n" + user_text
|
| 95 |
+
|
| 96 |
+
def call_model(prompt: str) -> str:
|
| 97 |
+
# Sustituye esto por tu llamada real al modelo / API
|
| 98 |
+
# Aquí solo devolvemos el prompt para depuración
|
| 99 |
+
return prompt
|
| 100 |
+
|
| 101 |
+
def infer(user_text: str) -> str:
|
| 102 |
+
prompt = build_prompt(user_text)
|
| 103 |
+
output = call_model(prompt)
|
| 104 |
+
return output
|
| 105 |
+
|
| 106 |
+
with gr.Blocks() as demo:
|
| 107 |
+
gr.Markdown("# Voyeur Prompt Generator (Demo)")
|
| 108 |
+
inp = gr.Textbox(label="Instrucciones del usuario")
|
| 109 |
+
out = gr.Textbox(label="Salida del modelo")
|
| 110 |
+
btn = gr.Button("Generar")
|
| 111 |
+
btn.click(fn=infer, inputs=inp, outputs=out)
|
| 112 |
+
|
| 113 |
+
if __name__ == "__main__":
|
| 114 |
+
demo.launch()
|
| 115 |
+
|