Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -116,10 +116,13 @@ with col1:
|
|
116 |
|
117 |
# Bot贸n para generar el texto (dentro de la interfaz principal)
|
118 |
if st.button("Escribir mi texto"):
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
116 |
|
117 |
# Bot贸n para generar el texto (dentro de la interfaz principal)
|
118 |
if st.button("Escribir mi texto"):
|
119 |
+
if target_audience and product: # Verificar que se haya proporcionado el p煤blico objetivo y el producto
|
120 |
+
try:
|
121 |
+
# Obtener la respuesta del modelo
|
122 |
+
generated_text = get_gemini_response(target_audience, product, text_type, length, mood, model_choice)
|
123 |
+
col2.subheader("Contenido generado:")
|
124 |
+
col2.write(generated_text) # Resultado del texto generado
|
125 |
+
except ValueError as e:
|
126 |
+
col2.error(f"Error: {str(e)}")
|
127 |
+
else:
|
128 |
+
col2.error("Por favor, proporciona el p煤blico objetivo y el producto.")
|