CR7CAD commited on
Commit
9ec76c6
·
verified ·
1 Parent(s): c93e946

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
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 creative short story writer. Your task is to write a brief, engaging story that directly incorporates all the elements mentioned in the image caption.
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
- Image caption: "{caption}"
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