mayf commited on
Commit
bddc67c
·
verified ·
1 Parent(s): 6adb177

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -53,12 +53,7 @@ def generate_story(caption: str) -> str:
53
  prompt = (
54
  "You are a creative children’s-story author.\n"
55
  f"Image description: “{caption}”\n\n"
56
- "Write a coherent 50–100 word story that:\n"
57
- "1. Introduces the main character.\n"
58
- "2. Shows a simple problem or discovery.\n"
59
- "3. Has a happy resolution.\n"
60
- "4. Uses clear language for ages 3–8.\n"
61
- "5. Keeps each sentence under 20 words.\n"
62
  )
63
  t0 = time.time()
64
  out = storyteller(prompt, max_new_tokens=120, temperature=0.7, top_p=0.9)[0]["generated_text"]
 
53
  prompt = (
54
  "You are a creative children’s-story author.\n"
55
  f"Image description: “{caption}”\n\n"
56
+ "Write a coherent 50–100 word story\n"
 
 
 
 
 
57
  )
58
  t0 = time.time()
59
  out = storyteller(prompt, max_new_tokens=120, temperature=0.7, top_p=0.9)[0]["generated_text"]