Szeyu commited on
Commit
df08c46
·
verified ·
1 Parent(s): c7b93dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ import string
12
  # Initialize pipelines with caching
13
  @st.cache_resource
14
  def load_pipelines():
15
- captioner = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")
16
  storyer = pipeline("text-generation", model="aspis/gpt2-genre-story-generation")
17
  tts = pipeline("text-to-speech", model="facebook/mms-tts-eng")
18
  return captioner, storyer, tts
@@ -65,7 +65,7 @@ def get_story(caption: str) -> str:
65
  prompt = (
66
  f"Write a funny, bright, and playful story for young children precisely centered on this scene {caption}\nStory: "
67
  f"mention the exact place, location or venue within {caption}. "
68
- "Make the story magical and exciting, with lots of friendly descriptions that little ones can enjoy."
69
  )
70
 
71
  raw = storyer(
 
12
  # Initialize pipelines with caching
13
  @st.cache_resource
14
  def load_pipelines():
15
+ captioner = pipeline("image-to-text", model="Salesforce/blip-image-captioning-large")
16
  storyer = pipeline("text-generation", model="aspis/gpt2-genre-story-generation")
17
  tts = pipeline("text-to-speech", model="facebook/mms-tts-eng")
18
  return captioner, storyer, tts
 
65
  prompt = (
66
  f"Write a funny, bright, and playful story for young children precisely centered on this scene {caption}\nStory: "
67
  f"mention the exact place, location or venue within {caption}. "
68
+ f"Make the story magical and exciting, with lots of friendly descriptions that little ones can enjoy."
69
  )
70
 
71
  raw = storyer(