Spaces:
Runtime error
Runtime error
Ruslan Magana Vsevolodovna
commited on
Commit
•
3f8f4bc
1
Parent(s):
ce5d780
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
import os
|
2 |
-
os.system("nvidia-smi")
|
3 |
# Step 2 - Importing Libraries
|
4 |
from moviepy.editor import *
|
5 |
from PIL import Image
|
@@ -25,7 +23,10 @@ title = "Video Story Generator with Audio by using dalle-mini and distilbart and
|
|
25 |
tokenizer = AutoTokenizer.from_pretrained("sshleifer/distilbart-cnn-12-6")
|
26 |
model = AutoModelForSeq2SeqLM.from_pretrained("sshleifer/distilbart-cnn-12-6")
|
27 |
|
28 |
-
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
|
|
|
|
|
|
29 |
#device = torch.device('cuda')
|
30 |
# transfer model
|
31 |
#model.to(device)
|
|
|
|
|
|
|
1 |
# Step 2 - Importing Libraries
|
2 |
from moviepy.editor import *
|
3 |
from PIL import Image
|
|
|
23 |
tokenizer = AutoTokenizer.from_pretrained("sshleifer/distilbart-cnn-12-6")
|
24 |
model = AutoModelForSeq2SeqLM.from_pretrained("sshleifer/distilbart-cnn-12-6")
|
25 |
|
26 |
+
#device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
27 |
+
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
28 |
+
print(device)
|
29 |
+
|
30 |
#device = torch.device('cuda')
|
31 |
# transfer model
|
32 |
#model.to(device)
|