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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -17,7 +17,8 @@ pipe = pipeline("text-generation", model="openai-community/gpt2")
17
 
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
  sequences = pipe(messages, max_length=500)
22
  gen_text = sequences[0]["generated_text"][len(messages):]
23
  return gen_text
 
17
 
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