koey811 commited on
Commit
c585c53
·
verified ·
1 Parent(s): f2bdad9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ def generate_caption(image):
29
 
30
  def generate_story(caption):
31
  # Generate the story based on the caption using the GPT-2 model
32
- prompt = f"Write a short, simple children's story inspired by the image of {caption}. Here's the story:\n\n"
33
  story = story_generator(prompt, max_length=500, num_return_sequences=1)[0]["generated_text"]
34
 
35
  # Extract the story text from the generated output
 
29
 
30
  def generate_story(caption):
31
  # Generate the story based on the caption using the GPT-2 model
32
+ prompt = f"{caption}\n\n"
33
  story = story_generator(prompt, max_length=500, num_return_sequences=1)[0]["generated_text"]
34
 
35
  # Extract the story text from the generated output