Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def text_to_audio(text, tts_model):
|
|
27 |
# Function to process the uploaded image and generate a story
|
28 |
def process_image(image, caption_model):
|
29 |
# Generate a caption from the uploaded image
|
30 |
-
caption = caption_model(image)[0]['
|
31 |
# Generate a story from the caption
|
32 |
story = generate_story(caption) # Call the story generation function
|
33 |
return caption, story # Return both caption and story
|
|
|
27 |
# Function to process the uploaded image and generate a story
|
28 |
def process_image(image, caption_model):
|
29 |
# Generate a caption from the uploaded image
|
30 |
+
caption = caption_model(image)[0]['generated_text'] # Get the caption from the model
|
31 |
# Generate a story from the caption
|
32 |
story = generate_story(caption) # Call the story generation function
|
33 |
return caption, story # Return both caption and story
|