JeCabrera commited on
Commit
c7fe348
verified
1 Parent(s): fc0b848

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -168,7 +168,7 @@ Inscr铆bete hoy y recibe un m贸dulo extra sobre c贸mo adaptar tu mensaje sin per
168
  }
169
  }
170
 
171
- def generate_headline_for_story(model, story, formula_type, product, target_audience, mood, temperature):
172
  generation_config = {
173
  "temperature": temperature,
174
  "top_p": 0.65,
@@ -303,6 +303,16 @@ def generate_headline_for_story(model, story, formula_type, product, target_audi
303
 
304
  def generate_story(formula_type, target_audience, product, action, mood, length, temperature, story_topic=None):
305
  """Funci贸n unificada para generar historias"""
 
 
 
 
 
 
 
 
 
 
306
  model = genai.GenerativeModel(
307
  model_name="gemini-2.0-flash",
308
  generation_config=generation_config
 
168
  }
169
  }
170
 
171
+ def generate_headline_for_story(story, formula_type, product, target_audience, mood, temperature):
172
  generation_config = {
173
  "temperature": temperature,
174
  "top_p": 0.65,
 
303
 
304
  def generate_story(formula_type, target_audience, product, action, mood, length, temperature, story_topic=None):
305
  """Funci贸n unificada para generar historias"""
306
+
307
+ # Definir la configuraci贸n del modelo
308
+ generation_config = {
309
+ "temperature": temperature,
310
+ "top_p": 0.65,
311
+ "top_k": 360,
312
+ "max_output_tokens": 8196,
313
+ }
314
+
315
+ # Inicializar el modelo con la configuraci贸n
316
  model = genai.GenerativeModel(
317
  model_name="gemini-2.0-flash",
318
  generation_config=generation_config