Spaces:
Sleeping
Sleeping
Commit
·
d0dc5fc
1
Parent(s):
7a73074
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
10 |
import torch
|
11 |
|
12 |
tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-en-ar")
|
13 |
-
model = torch.load("helsinki_fineTuned.pt")
|
14 |
translation_pipeline = pipeline(model)
|
15 |
|
16 |
|
|
|
10 |
import torch
|
11 |
|
12 |
tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-en-ar")
|
13 |
+
model = torch.load("helsinki_fineTuned.pt", map_location=torch.device('cpu'))
|
14 |
translation_pipeline = pipeline(model)
|
15 |
|
16 |
|