anton-l HF staff commited on
Commit
e8720a0
·
1 Parent(s): 0fef3d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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()