xieqilenb commited on
Commit
bf12906
·
verified ·
1 Parent(s): fb2d276

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,13 +27,13 @@ def generate_story(caption):
27
  "Using the image details provided below, please craft an enchanting tale tailored for children aged 3 to 10. "
28
  "Rather than simply reiterating the image details, enhance your story with imaginative characters, quirky adventures, "
29
  "and delightful surprises that ignite wonder in every young heart. Let your narrative flow naturally and ensure that your story is complete, with a clear beginning, middle, and end. "
30
- "Please ensure the total word count does not exceed 100 words, and do not leave the story incomplete.\n\n"
31
  f"Image Details: {caption}\n\nStory:"
32
  )
33
 
34
  result = story_generator(
35
  prompt,
36
- max_new_tokens=150,
37
  num_return_sequences=1,
38
  do_sample=True,
39
  temperature=1.0
 
27
  "Using the image details provided below, please craft an enchanting tale tailored for children aged 3 to 10. "
28
  "Rather than simply reiterating the image details, enhance your story with imaginative characters, quirky adventures, "
29
  "and delightful surprises that ignite wonder in every young heart. Let your narrative flow naturally and ensure that your story is complete, with a clear beginning, middle, and end. "
30
+ "Please ensure the total word count does not exceed 70 words, and do not leave the story incomplete.\n\n"
31
  f"Image Details: {caption}\n\nStory:"
32
  )
33
 
34
  result = story_generator(
35
  prompt,
36
+ max_new_tokens=100,
37
  num_return_sequences=1,
38
  do_sample=True,
39
  temperature=1.0