JoannaKOKO commited on
Commit
ed92830
·
verified ·
1 Parent(s): 576fa76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -60,12 +60,12 @@ def generate_caption(image_bytes):
60
  # Function to generate a story from a caption
61
  def generate_story(caption):
62
  try:
63
- prompt = f"Based on this text:'{caption}', ellaborate a short story with no more than 100 words for young children."
64
  story_output = story_generator(
65
  prompt,
66
  max_length=150,
67
  do_sample=True,
68
- temperature=0.7,
69
  top_p=0.9,
70
  num_return_sequences=1
71
  )
 
60
  # Function to generate a story from a caption
61
  def generate_story(caption):
62
  try:
63
+ prompt = [f"Based on this text:'{caption}', ellaborate a short story with no more than 100 words for young children."]
64
  story_output = story_generator(
65
  prompt,
66
  max_length=150,
67
  do_sample=True,
68
+ temperature=0.2,
69
  top_p=0.9,
70
  num_return_sequences=1
71
  )