RafaelJaime commited on
Commit
d01b870
1 Parent(s): 5fe0e11

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ examples = [
29
 
30
  @measure_performance
31
  def generate_story(theme):
32
- prompt = [{"role": "user", "content": f"Tell me a storie about {theme}"}]
33
  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)
34
  generated_story = story[0]["generated_text"]
35
  return generated_story
 
29
 
30
  @measure_performance
31
  def generate_story(theme):
32
+ prompt = f"Tell me a storie about {theme}"
33
  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)
34
  generated_story = story[0]["generated_text"]
35
  return generated_story