RafaelJaime commited on
Commit
8c97c14
1 Parent(s): 25b461d

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ examples = [
29
  @measure_performance
30
  def generate_story(theme):
31
  prompt = f"Crea una historia {theme} en español"
32
- story = generate_story_pipe(prompt, max_length=400, num_return_sequences=1, temperature=0.7, do_sample=True, repetition_penalty=3.0)
33
  generated_story = story[0]["generated_text"]
34
  return generated_story
35
 
 
29
  @measure_performance
30
  def generate_story(theme):
31
  prompt = f"Crea una historia {theme} en español"
32
+ story = generate_story_pipe(prompt, max_length=400, num_return_sequences=1, temperature=0.7, do_sample=True, repetition_penalty=3.0, eos_token_id=generate_story_pipe.model.config.eos_token_id, pad_token_id=generate_story_pipe.model.config.pad_token_id)
33
  generated_story = story[0]["generated_text"]
34
  return generated_story
35