Jordan Myers
commited on
Commit
•
6318241
1
Parent(s):
6db21cb
device fix
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import torch
|
|
5 |
# this model was loaded from https://hf.co/models
|
6 |
model = AutoModelForSeq2SeqLM.from_pretrained("Jayyydyyy/m2m100_418m_tokipona")
|
7 |
tokenizer = AutoTokenizer.from_pretrained("facebook/m2m100_418M")
|
8 |
-
device = 0 if torch.cuda.is_available() else
|
9 |
LANGS = ["English", "toki pona"]
|
10 |
LANG_CODES = {
|
11 |
"English":"en",
|
|
|
5 |
# this model was loaded from https://hf.co/models
|
6 |
model = AutoModelForSeq2SeqLM.from_pretrained("Jayyydyyy/m2m100_418m_tokipona")
|
7 |
tokenizer = AutoTokenizer.from_pretrained("facebook/m2m100_418M")
|
8 |
+
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
9 |
LANGS = ["English", "toki pona"]
|
10 |
LANG_CODES = {
|
11 |
"English":"en",
|