Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -90,17 +90,17 @@ def generate_bullets(number_of_bullets, target_audience, product, call_to_action
|
|
90 |
generation_config=generation_config,
|
91 |
)
|
92 |
|
93 |
-
|
94 |
-
try:
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
except Exception as e:
|
103 |
-
|
104 |
|
105 |
# Configurar la interfaz de usuario con Streamlit
|
106 |
st.set_page_config(page_title="Quick Prompt", layout="wide")
|
|
|
90 |
generation_config=generation_config,
|
91 |
)
|
92 |
|
93 |
+
# Generar el resultado utilizando el modelo con la instrucci贸n de bullets espec铆fica
|
94 |
+
try:
|
95 |
+
response = model.generate_content([system_instruction])
|
96 |
+
|
97 |
+
# Extraer el texto de la respuesta
|
98 |
+
generated_bullets = response.candidates[0].content.parts[0].text.strip() # Modificado aqu铆
|
99 |
+
|
100 |
+
# Retornar el resultado
|
101 |
+
return generated_bullets
|
102 |
+
except Exception as e:
|
103 |
+
raise ValueError(f"Error al generar los bullets: {str(e)}")
|
104 |
|
105 |
# Configurar la interfaz de usuario con Streamlit
|
106 |
st.set_page_config(page_title="Quick Prompt", layout="wide")
|