Ruslan Magana Vsevolodovna
commited on
Commit
·
04bcc37
1
Parent(s):
b0a317b
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ from os import getcwd
|
|
| 18 |
import glob
|
| 19 |
import nltk
|
| 20 |
nltk.download('punkt')
|
| 21 |
-
|
| 22 |
description = " Video Story Generator with Audio \n PS: Generation of video by using Artifical Intellingence by dalle-mini and distilbart and gtss "
|
| 23 |
title = "Video Story Generator with Audio by using dalle-mini and distilbart and gtss "
|
| 24 |
tokenizer = AutoTokenizer.from_pretrained("sshleifer/distilbart-cnn-12-6")
|
|
@@ -204,7 +204,7 @@ def get_output_video(text):
|
|
| 204 |
text ='Once, there was a girl called Laura who went to the supermarket to buy the ingredients to make a cake. Because today is her birthday and her friends come to her house and help her to prepare the cake.'
|
| 205 |
demo = gr.Blocks()
|
| 206 |
with demo:
|
| 207 |
-
gr.Markdown("# Video Generator from
|
| 208 |
gr.Markdown("A story can be input by user. The story is summarized using DistillBART model. Then, then it is generated the images by using Dalle-mini and created the subtitles and audio gtts. These are generated as a video.")
|
| 209 |
with gr.Row():
|
| 210 |
# Left column (inputs)
|
|
|
|
| 18 |
import glob
|
| 19 |
import nltk
|
| 20 |
nltk.download('punkt')
|
| 21 |
+
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
| 22 |
description = " Video Story Generator with Audio \n PS: Generation of video by using Artifical Intellingence by dalle-mini and distilbart and gtss "
|
| 23 |
title = "Video Story Generator with Audio by using dalle-mini and distilbart and gtss "
|
| 24 |
tokenizer = AutoTokenizer.from_pretrained("sshleifer/distilbart-cnn-12-6")
|
|
|
|
| 204 |
text ='Once, there was a girl called Laura who went to the supermarket to buy the ingredients to make a cake. Because today is her birthday and her friends come to her house and help her to prepare the cake.'
|
| 205 |
demo = gr.Blocks()
|
| 206 |
with demo:
|
| 207 |
+
gr.Markdown("# Video Generator from stories with Artificial Intelligence")
|
| 208 |
gr.Markdown("A story can be input by user. The story is summarized using DistillBART model. Then, then it is generated the images by using Dalle-mini and created the subtitles and audio gtts. These are generated as a video.")
|
| 209 |
with gr.Row():
|
| 210 |
# Left column (inputs)
|