Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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"
|
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
|