kidsampson commited on
Commit
d396e37
·
verified ·
1 Parent(s): 63080eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ pipe = pipeline("text-generation", model="openai-community/gpt2")
18
 
19
  def response(age, story):
20
  #messages = f"this is the 300 word story of {story} in words a {age} year old can understand."
21
- messages = f"Tell the story of {story} in 300 words using language a {age} year old can understand."
22
  sequences = pipe(messages, max_length=500)
23
  gen_text = sequences[0]["generated_text"][len(messages):]
24
  return gen_text
 
18
 
19
  def response(age, story):
20
  #messages = f"this is the 300 word story of {story} in words a {age} year old can understand."
21
+ messages = f"You are a school teacher telling stories to children. Retell the story of {story} in 300 words using language a {age} year old can understand."
22
  sequences = pipe(messages, max_length=500)
23
  gen_text = sequences[0]["generated_text"][len(messages):]
24
  return gen_text