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

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"{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
 
29
 
30
  def generate_story(caption):
31
  # Generate the story based on the caption using the GPT-2 model
32
+ prompt = f"Could you please suggest a story or fairytale in 100 words based on the {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