Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ def image_to_caption(image_path):
|
|
| 16 |
# Generates a story for the caption using a pre-trained model
|
| 17 |
def caption_to_story(text):
|
| 18 |
captiontostory = pipeline("text-generation", model="pranavpsv/genre-story-generator-v2")
|
| 19 |
-
story = captiontostory(text,max_length=150,min_length=50)[0]['generated_text']
|
| 20 |
return story
|
| 21 |
|
| 22 |
# Generates an audio for the story
|
|
|
|
| 16 |
# Generates a story for the caption using a pre-trained model
|
| 17 |
def caption_to_story(text):
|
| 18 |
captiontostory = pipeline("text-generation", model="pranavpsv/genre-story-generator-v2")
|
| 19 |
+
story = captiontostory(text, max_length=150, min_length=50)[0]['generated_text']
|
| 20 |
return story
|
| 21 |
|
| 22 |
# Generates an audio for the story
|