Lahiru Menikdiwela
commited on
Commit
•
16ecc46
1
Parent(s):
32e6acc
revert changes
Browse files
model.py
CHANGED
@@ -19,11 +19,11 @@ def get_local_model(model_name_or_path:str)->pipeline:
|
|
19 |
|
20 |
#print(f"Model is running on {device}")
|
21 |
|
22 |
-
tokenizer =
|
23 |
model_name_or_path,
|
24 |
token = hf_token
|
25 |
)
|
26 |
-
model =
|
27 |
model_name_or_path,
|
28 |
torch_dtype=torch.float32,
|
29 |
token = hf_token
|
|
|
19 |
|
20 |
#print(f"Model is running on {device}")
|
21 |
|
22 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
23 |
model_name_or_path,
|
24 |
token = hf_token
|
25 |
)
|
26 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(
|
27 |
model_name_or_path,
|
28 |
torch_dtype=torch.float32,
|
29 |
token = hf_token
|