Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,10 @@
|
|
| 1 |
-
# app.py (Versión FINAL
|
| 2 |
|
| 3 |
import os
|
| 4 |
import gradio as gr
|
| 5 |
import requests
|
| 6 |
from typing import List, Dict, Union, Tuple
|
| 7 |
import json
|
| 8 |
-
# Importamos las listas de data.py
|
| 9 |
from data import (
|
| 10 |
PROFESSIONS,
|
| 11 |
LACE_THONG_STYLES,
|
|
@@ -45,41 +44,41 @@ VOYEUR_SPECIALIST_CONFIG = {
|
|
| 45 |
}
|
| 46 |
|
| 47 |
# ============================================
|
| 48 |
-
# CONSTRUCCIÓN DEL PROMPT DEL SISTEMA (
|
| 49 |
# ============================================
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
|
|
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
|
| 59 |
SYSTEM_PROMPT_BASE = f"""Eres {VOYEUR_SPECIALIST_CONFIG['role']}.
|
| 60 |
|
| 61 |
ESPECIALIDADES:
|
| 62 |
-
{
|
| 63 |
|
| 64 |
EXPERIENCIA TÉCNICA:
|
| 65 |
-
{
|
| 66 |
|
| 67 |
PRINCIPIOS ÉTICOS:
|
| 68 |
-
{
|
| 69 |
|
| 70 |
INSTRUCCIONES:
|
| 71 |
- Conversa normalmente en español si el usuario no pide prompts.
|
| 72 |
- Si pide prompts, respóndelos exclusivamente en inglés.
|
| 73 |
- Los prompts deben ir dentro de bloques: ```prompt [contenido]```.
|
| 74 |
- El contenido del prompt debe ser de alta calidad, sugerente, voyeur y artístico.
|
| 75 |
-
- Elige elementos al azar de las listas de Profesiones, Lencería y Momentos Cotidianos
|
| 76 |
-
- **USO DE DATOS:** Debes integrar los siguientes elementos en tus prompts.
|
| 77 |
|
| 78 |
ELEMENTOS DISPONIBLES:
|
| 79 |
-
- Profesiones: {
|
| 80 |
-
- Estilos de thong: {
|
| 81 |
-
- Estilos de hosiery: {
|
| 82 |
|
| 83 |
EJEMPLO DE OUTPUT:
|
| 84 |
```prompt
|
| 85 |
-
Ultra-realistic voyeuristic photo of a Linguistics Professor, caught in the sensual everyday moment of 'pulling up thigh-high hosiery'
|
|
|
|
| 1 |
+
# app.py (Versión FINAL - ERROR CORREGIDO)
|
| 2 |
|
| 3 |
import os
|
| 4 |
import gradio as gr
|
| 5 |
import requests
|
| 6 |
from typing import List, Dict, Union, Tuple
|
| 7 |
import json
|
|
|
|
| 8 |
from data import (
|
| 9 |
PROFESSIONS,
|
| 10 |
LACE_THONG_STYLES,
|
|
|
|
| 44 |
}
|
| 45 |
|
| 46 |
# ============================================
|
| 47 |
+
# CONSTRUCCIÓN DEL PROMPT DEL SISTEMA (SIN ERRORES)
|
| 48 |
# ============================================
|
| 49 |
|
| 50 |
+
# Construimos el prompt por partes para evitar errores de string
|
| 51 |
+
specialties_list = "\n".join([f"• {s}" for s in VOYEUR_SPECIALIST_CONFIG["specialties"]])
|
| 52 |
+
expertise_list = "\n".join([f"• {e}" for e in VOYEUR_SPECIALIST_CONFIG["technical_expertise"]])
|
| 53 |
+
ethics_list = "\n".join([f"• {p}" for p in VOYEUR_SPECIALIST_CONFIG["ethical_principles"]])
|
| 54 |
|
| 55 |
+
professions_str = ", ".join(PROFESSIONS[:20]) # Tomamos solo las primeras para no hacerlo muy largo
|
| 56 |
+
thongs_str = ", ".join(LACE_THONG_STYLES[:10])
|
| 57 |
+
hosiery_str = ", ".join(HOSIERY_STYLES[:10])
|
| 58 |
|
| 59 |
SYSTEM_PROMPT_BASE = f"""Eres {VOYEUR_SPECIALIST_CONFIG['role']}.
|
| 60 |
|
| 61 |
ESPECIALIDADES:
|
| 62 |
+
{specialties_list}
|
| 63 |
|
| 64 |
EXPERIENCIA TÉCNICA:
|
| 65 |
+
{expertise_list}
|
| 66 |
|
| 67 |
PRINCIPIOS ÉTICOS:
|
| 68 |
+
{ethics_list}
|
| 69 |
|
| 70 |
INSTRUCCIONES:
|
| 71 |
- Conversa normalmente en español si el usuario no pide prompts.
|
| 72 |
- Si pide prompts, respóndelos exclusivamente en inglés.
|
| 73 |
- Los prompts deben ir dentro de bloques: ```prompt [contenido]```.
|
| 74 |
- El contenido del prompt debe ser de alta calidad, sugerente, voyeur y artístico.
|
| 75 |
+
- Elige elementos al azar de las listas de Profesiones, Lencería y Momentos Cotidianos.
|
|
|
|
| 76 |
|
| 77 |
ELEMENTOS DISPONIBLES:
|
| 78 |
+
- Profesiones: {professions_str}... (y más)
|
| 79 |
+
- Estilos de thong: {thongs_str}... (y más)
|
| 80 |
+
- Estilos de hosiery: {hosiery_str}... (y más)
|
| 81 |
|
| 82 |
EJEMPLO DE OUTPUT:
|
| 83 |
```prompt
|
| 84 |
+
Ultra-realistic voyeuristic photo of a Linguistics Professor, caught in the sensual everyday moment of 'pulling up thigh-high hosiery', wearing an oversized button-down shirt and a silk-trim micro lace thong subtly visible. Ambience: soft morning light through curtains. Shot on Fujifilm GFX 100S, 110mm f/2 lens, high texture, subtle grain, cinematic warm shadows. --ar 9:16 --style raw --q 2
|