Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,25 +65,20 @@ def get_gemini_response_bullets(target_audience, product, num_bullets, temperatu
|
|
| 65 |
model_name="gemini-1.5-flash", # Nombre del modelo que estamos utilizando
|
| 66 |
generation_config=generation_config, # Configuraci贸n de generaci贸n
|
| 67 |
system_instruction=(
|
| 68 |
-
f"
|
| 69 |
-
|
| 70 |
-
"
|
| 71 |
-
f"When responding, always include a heading referencing {target_audience} as follows: 'Aqu铆 hay {num_bullets} bullets para convencer a {target_audience}.'"
|
| 72 |
)
|
| 73 |
)
|
| 74 |
|
| 75 |
-
# Crear
|
| 76 |
chat_session = model.start_chat(
|
| 77 |
history=[
|
| 78 |
{
|
| 79 |
"role": "user",
|
| 80 |
"parts": [
|
| 81 |
f"Tu tarea es escribir {num_bullets} bullets que denoten los beneficios que resolver谩n los problemas de {target_audience}. "
|
| 82 |
-
"
|
| 83 |
-
f"Escribe bullets creativos, en un estilo conversacional, que no sean aburridos, sino m谩s bien divertidos. "
|
| 84 |
-
f"S茅 sutil a la hora de crear los bullets para referirte a los beneficios de tu {product}. "
|
| 85 |
-
f"Usa estos ejemplos como inspiraci贸n: {', '.join(selected_bullets)}. "
|
| 86 |
-
"Por favor, crea los bullets ahora."
|
| 87 |
],
|
| 88 |
},
|
| 89 |
]
|
|
|
|
| 65 |
model_name="gemini-1.5-flash", # Nombre del modelo que estamos utilizando
|
| 66 |
generation_config=generation_config, # Configuraci贸n de generaci贸n
|
| 67 |
system_instruction=(
|
| 68 |
+
f"Eres un experto copywriter especializado en escribir bullets que resuelven los problemas de {target_audience}. "
|
| 69 |
+
"Tu tarea es crear bullets creativos y persuasivos que capturen la atenci贸n de {target_audience}. "
|
| 70 |
+
"Usa estos ejemplos como inspiraci贸n: {', '.join(selected_bullets)}."
|
|
|
|
| 71 |
)
|
| 72 |
)
|
| 73 |
|
| 74 |
+
# Crear un mensaje para el modelo que incluye los bullets generados
|
| 75 |
chat_session = model.start_chat(
|
| 76 |
history=[
|
| 77 |
{
|
| 78 |
"role": "user",
|
| 79 |
"parts": [
|
| 80 |
f"Tu tarea es escribir {num_bullets} bullets que denoten los beneficios que resolver谩n los problemas de {target_audience}. "
|
| 81 |
+
"Aseg煤rate de que cada bullet sea atractivo y siga el estilo conversacional."
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
],
|
| 83 |
},
|
| 84 |
]
|