JeCabrera commited on
Commit
03c389f
verified
1 Parent(s): fc00a0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -4,6 +4,7 @@ import os
4
  import google.generativeai as genai
5
  from story_formulas import story_formulas
6
  from styles import apply_styles, format_story_output
 
7
 
8
  # Cargar variables de entorno
9
  load_dotenv()
@@ -56,7 +57,6 @@ def get_gemini_response(input_prompt, formula_type, length, mood, target_audienc
56
  return response.parts[0].text if response and response.parts else "Error al generar contenido."
57
 
58
  # Configurar la aplicaci贸n Streamlit
59
- # Move this line to the top, right after set_page_config
60
  st.set_page_config(page_title="Story Generator", page_icon=":pencil:", layout="wide")
61
  st.markdown(apply_styles(), unsafe_allow_html=True) # Add this line here
62
 
@@ -83,9 +83,12 @@ with col1:
83
  formula_type = st.selectbox(
84
  "F贸rmula narrativa:",
85
  options=list(story_formulas.keys()),
86
- format_func=lambda x: x
87
  )
88
 
 
 
 
 
89
  length = st.slider("Longitud del texto (palabras):",
90
  min_value=100,
91
  max_value=150,
 
4
  import google.generativeai as genai
5
  from story_formulas import story_formulas
6
  from styles import apply_styles, format_story_output
7
+ from story_moods import story_moods # Agregar esta importaci贸n al inicio
8
 
9
  # Cargar variables de entorno
10
  load_dotenv()
 
57
  return response.parts[0].text if response and response.parts else "Error al generar contenido."
58
 
59
  # Configurar la aplicaci贸n Streamlit
 
60
  st.set_page_config(page_title="Story Generator", page_icon=":pencil:", layout="wide")
61
  st.markdown(apply_styles(), unsafe_allow_html=True) # Add this line here
62
 
 
83
  formula_type = st.selectbox(
84
  "F贸rmula narrativa:",
85
  options=list(story_formulas.keys()),
 
86
  )
87
 
88
+ mood = st.selectbox(
89
+ "脕ngulo de Historia:",
90
+ options=list(story_moods.keys()),
91
+ )
92
  length = st.slider("Longitud del texto (palabras):",
93
  min_value=100,
94
  max_value=150,