mxiean commited on
Commit
dc036ce
·
verified ·
1 Parent(s): 3939aed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,13 +12,13 @@ def img2text(url):
12
 
13
  # text2story
14
  def text2story(text):
15
- pipe = pipeline("text-generation", model="distilbert/distilgpt2")
16
  story_text = pipe(text, max_length=100)[0]['generated_text']
17
  return story_text
18
 
19
  # text2audio
20
  def text2audio(story_text):
21
- pipe = pipeline("text-to-speech", model="espnet/kan-bayashi_ljspeech_vits")
22
  audio_data = pipe(story_text)
23
  return audio_data
24
 
 
12
 
13
  # text2story
14
  def text2story(text):
15
+ pipe = pipeline("text-generation", model="gpt2")
16
  story_text = pipe(text, max_length=100)[0]['generated_text']
17
  return story_text
18
 
19
  # text2audio
20
  def text2audio(story_text):
21
+ pipe = pipeline("text-to-speech", model="facebook/mms-tts-eng")
22
  audio_data = pipe(story_text)
23
  return audio_data
24