justREE commited on
Commit
f137cdb
·
verified ·
1 Parent(s): 29df25d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -57,10 +57,7 @@ def caption_image(img: Image.Image, captioner) -> str:
57
  def story_from_caption(caption: str, pipe) -> str:
58
  if not caption:
59
  return "Could not generate a story without a caption."
60
- prompt = (
61
- f"Write an imaginative story 50–100 word story based on the caption: {caption}"
62
- f"Be creative within the caption."
63
- )
64
  results = pipe(
65
  prompt,
66
  max_length=150,
@@ -76,6 +73,7 @@ def story_from_caption(caption: str, pipe) -> str:
76
  return sentence_case(raw)
77
 
78
 
 
79
  def tts_bytes(text: str, tts_pipe) -> bytes:
80
  if not text:
81
  return b""
 
57
  def story_from_caption(caption: str, pipe) -> str:
58
  if not caption:
59
  return "Could not generate a story without a caption."
60
+ prompt = f"Write a creative imaginary 50–100 word story using the description: {caption}"
 
 
 
61
  results = pipe(
62
  prompt,
63
  max_length=150,
 
73
  return sentence_case(raw)
74
 
75
 
76
+
77
  def tts_bytes(text: str, tts_pipe) -> bytes:
78
  if not text:
79
  return b""