Spaces:
Sleeping
Sleeping
Update app.py
Browse files28 unmodified lines293031323334353624 unmodified lines616263646566671 unmodified line6970717273747548 unmodified lines12412512612712812913028 unmodified linesdef get_gemini_response_bullets(target_audience, product, num_bullets, temperature):model_choice = "gemini-1.5-flash" # Modelo por defecto# Seleccionar un bullet aleatorio de los ejemplosselected_bullet = random.choice(list(bullets_examples.values()))# Configuración del modelo generativo y las instrucciones del sistemamodel = genai.GenerativeModel(24 unmodified linesf"Un buen bullet conecta los síntomas con los problemas enfrentados por {target_audience} de una manera natural, que no se note como manipuladora."f"Escribe bullets creativos, en un estilo conversacional, que no sean aburridos, sino más bien divertidos. "f"Sé sutil a la hora de crear los bullets para referirte a los beneficios del {product}. "f"Usa este ejemplo como inspiración: {selected_bullet}." # Añadir bullet aleatorio"1. **Connection**: Words that highlight the relationship between the product and the benefit for the user (e.g., 'Improve,' 'Transform').\n""2. **Benefit**: Explain how the user will benefit by attending, downloading, or purchasing the product.\n\n""Ensure each bullet follows the structure of 'Connection + connector + Benefit,' and avoid including explanations like 'Connection: Improve' or 'Benefit: Increase my happiness.'\n"1 unmodified line"Use these guidelines to generate high-converting bullets in Spanish.""Important: Never include explanations or categories, like this: 'La leyenda del padre soltero: Dice que nunca hay tiempo suficiente. El yoga te enseña a usar mejor el tiempo que tienes, incluso cuando te parece imposible.' ""Bullets should vary, based on these examples to guide your task of creating bullets:\n\n"f"* {selected_bullet} "# Añadir más ejemplos si es necesario"Por favor, crea los bullets ahora."],48 unmodified linesproduct = st.text_input("¿Qué producto tienes en mente?")# Campos de personalización sin acordeónnum_bullets = st.slider("Número de Bullets", min_value=1, max_value=15, value=5)temperature = st.slider("Creatividad", min_value=0.0, max_value=1.0, value=0.5, step=0.1)# Botón de enviar28 unmodified lines293031323334353624 unmodified lines616263646566671 unmodified line6970717273747548 unmodified lines12412512612712812913028 unmodified linesdef get_gemini_response_bullets(target_audience, product, num_bullets, temperature):model_choice = "gemini-1.5-flash" # Modelo por defecto# Seleccionar múltiples bullets aleatorios de los ejemplosselected_bullets = random.sample(list(bullets_examples.values()), min(num_bullets, len(bullets_examples)))# Configuración del modelo generativo y las instrucciones del sistemamodel = genai.GenerativeModel(24 unmodified linesf"Un buen bullet conecta los síntomas con los problemas enfrentados por {target_audience} de una manera natural, que no se note como manipuladora."f"Escribe bullets creativos, en un estilo conversacional, que no sean aburridos, sino más bien divertidos. "f"Sé sutil a la hora de crear los bullets para referirte a los beneficios del {product}. "f"Usa estos ejemplos como inspiración: {', '.join(selected_bullets)}." # Añadir bullets aleatorios"1. **Connection**: Words that highlight the relationship between the product and the benefit for the user (e.g., 'Improve,' 'Transform').\n""2. **Benefit**: Explain how the user will benefit by attending, downloading, or purchasing the product.\n\n""Ensure each bullet follows the structure of 'Connection + connector + Benefit,' and avoid including explanations like 'Connection: Improve' or 'Benefit: Increase my happiness.'\n"1 unmodified line"Use these guidelines to generate high-converting bullets in Spanish.""Important: Never include explanations or categories, like this: 'La leyenda del padre soltero: Dice que nunca hay tiempo suficiente. El yoga te enseña a usar mejor el tiempo que tienes, incluso cuando te parece imposible.' ""Bullets should vary, based on these examples to guide your task of creating bullets:\n\n"f"* {', '.join(selected_bullets)} "# Añadir más ejemplos si es necesario"Por favor, crea los bullets ahora."],48 unmodified linesproduct = st.text_input("¿Qué producto tienes en mente?")# Campos de personalización sin acordeónnum_bullets = st.slider("Número de Bullets", min_value=1, max_value=10, value=5)temperature = st.slider("Creatividad", min_value=0.0, max_value=1.0, value=0.5, step=0.1)# Botón de enviar
app.py+5-5