Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -92,12 +92,12 @@ with st.sidebar:
|
|
92 |
mood = st.selectbox("Tono de voz", ["Conversacional", "Formal", "Emocional", "Persuasivo"])
|
93 |
model_choice = st.selectbox("Modelo", ["gemini-1.5-flash", "gemini-1.5-pro"])
|
94 |
|
95 |
-
# Bot贸n para generar el texto
|
96 |
-
if st.button("Escribir mi texto"):
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
92 |
mood = st.selectbox("Tono de voz", ["Conversacional", "Formal", "Emocional", "Persuasivo"])
|
93 |
model_choice = st.selectbox("Modelo", ["gemini-1.5-flash", "gemini-1.5-pro"])
|
94 |
|
95 |
+
# Bot贸n para generar el texto
|
96 |
+
if st.button("Escribir mi texto"):
|
97 |
+
try:
|
98 |
+
# Obtener la respuesta del modelo
|
99 |
+
generated_text = get_gemini_response(target_audience, product, text_type, length, mood, model_choice)
|
100 |
+
st.write("**Texto generado:**")
|
101 |
+
st.write(generated_text)
|
102 |
+
except Exception as e:
|
103 |
+
st.error(f"Ocurri贸 un error: {e}")
|