Update app.py
Browse files
app.py
CHANGED
@@ -39,9 +39,9 @@ def compose_story_from_caption(caption_detail):
|
|
39 |
story_results = story_pipeline(prompt_text, num_return_sequences=1)
|
40 |
story_text = story_results[0]['generated_text']
|
41 |
if "Story:" in story_text:
|
42 |
-
|
43 |
else:
|
44 |
-
|
45 |
return story
|
46 |
|
47 |
|
|
|
39 |
story_results = story_pipeline(prompt_text, num_return_sequences=1)
|
40 |
story_text = story_results[0]['generated_text']
|
41 |
if "Story:" in story_text:
|
42 |
+
story = story_text.split("Story:", 1)[1].strip()
|
43 |
else:
|
44 |
+
story = story_text.strip()
|
45 |
return story
|
46 |
|
47 |
|