Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ from rudalle import get_rudalle_model, get_tokenizer, get_vae
|
|
12 |
tqdm.__init__ = partialmethod(tqdm.__init__, disable=True)
|
13 |
|
14 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
15 |
-
translation_model = FSMTForConditionalGeneration.from_pretrained("facebook/wmt19-en-ru", torch_dtype=torch.float16).to(device)
|
16 |
translation_tokenizer = FSMTTokenizer.from_pretrained("facebook/wmt19-en-ru")
|
17 |
dalle = get_rudalle_model("Malevich", pretrained=True, fp16=True, device=device)
|
18 |
tokenizer = get_tokenizer()
|
|
|
12 |
tqdm.__init__ = partialmethod(tqdm.__init__, disable=True)
|
13 |
|
14 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
15 |
+
translation_model = FSMTForConditionalGeneration.from_pretrained("facebook/wmt19-en-ru", torch_dtype=torch.float16).half().to(device)
|
16 |
translation_tokenizer = FSMTTokenizer.from_pretrained("facebook/wmt19-en-ru")
|
17 |
dalle = get_rudalle_model("Malevich", pretrained=True, fp16=True, device=device)
|
18 |
tokenizer = get_tokenizer()
|