Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,12 +48,9 @@ def text2story(caption, _models):
|
|
| 48 |
|
| 49 |
# Format prompt to ensure the story expands on the image caption
|
| 50 |
prompt = f"""<|system|>
|
| 51 |
-
You are a
|
| 52 |
-
The story must be about exactly what is described in the caption - use the specific objects, people, actions, and setting mentioned.
|
| 53 |
-
Keep the story under 100 words and ensure it has a clear beginning, middle, and end.
|
| 54 |
<|user|>
|
| 55 |
-
|
| 56 |
-
Write a short story that directly relates to this specific image caption. All elements from the caption must appear in your story.
|
| 57 |
<|assistant|>"""
|
| 58 |
|
| 59 |
# Generate story with parameters tuned for brevity and coherence
|
|
|
|
| 48 |
|
| 49 |
# Format prompt to ensure the story expands on the image caption
|
| 50 |
prompt = f"""<|system|>
|
| 51 |
+
You are a story generating assistant.
|
|
|
|
|
|
|
| 52 |
<|user|>
|
| 53 |
+
Please generate a story within 100 words based on: {caption}
|
|
|
|
| 54 |
<|assistant|>"""
|
| 55 |
|
| 56 |
# Generate story with parameters tuned for brevity and coherence
|