JeCabrera commited on
Commit
f51361f
verified
1 Parent(s): 08b373b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -552,15 +552,16 @@ IMPORTANT FINAL REMINDER:
552
  # Aseg煤rate de que las instrucciones de naturalidad est茅n al inicio del prompt
553
  story_instruction = f"{natural_instruction}\n\n{story_instruction}"
554
 
555
- response = model.generate_content([story_instruction])
556
- if response and response.parts:
557
- story = response.parts[0].text.strip()
558
- formula_types = ["GPS", "AIDA", "4U", "N煤merica Suprema"]
559
- selected_formula = random.choice(formula_types)
560
- headline = generate_headline_for_story(model, story, selected_formula, product, target_audience, mood)
561
- if headline:
562
- return f"{headline}\n\n{story}"
563
- raise ValueError("No se pudo generar la historia")
 
564
 
565
  # Inicializar la aplicaci贸n Streamlit
566
  st.set_page_config(page_title="Generador de Historias", page_icon=":pencil:", layout="wide")
 
552
  # Aseg煤rate de que las instrucciones de naturalidad est茅n al inicio del prompt
553
  story_instruction = f"{natural_instruction}\n\n{story_instruction}"
554
 
555
+ # Generar la historia
556
+ response = model.generate_content([story_instruction])
557
+ if response and response.parts:
558
+ story = response.parts[0].text.strip()
559
+ formula_types = ["GPS", "AIDA", "4U", "N煤merica Suprema"]
560
+ selected_formula = random.choice(formula_types)
561
+ headline = generate_headline_for_story(model, story, selected_formula, product, target_audience, mood)
562
+ if headline:
563
+ return f"{headline}\n\n{story}"
564
+ raise ValueError("No se pudo generar la historia")
565
 
566
  # Inicializar la aplicaci贸n Streamlit
567
  st.set_page_config(page_title="Generador de Historias", page_icon=":pencil:", layout="wide")