Update app.py
Browse files
app.py
CHANGED
|
@@ -13,8 +13,8 @@ def img2text(url):
|
|
| 13 |
|
| 14 |
# text2story
|
| 15 |
def text2story(text):
|
| 16 |
-
text_to_story_model =
|
| 17 |
-
story_text =
|
| 18 |
return story_text
|
| 19 |
|
| 20 |
# text2audio
|
|
|
|
| 13 |
|
| 14 |
# text2story
|
| 15 |
def text2story(text):
|
| 16 |
+
text_to_story_model = pipeline("text-generation",model="distilbert/distilgpt2")
|
| 17 |
+
story_text = text_to_story_model(text,min_length=100,num_return_sequences=1)
|
| 18 |
return story_text
|
| 19 |
|
| 20 |
# text2audio
|