Deepakvictor
commited on
Commit
•
1bb7323
1
Parent(s):
a1a19b0
Update handler.py
Browse files- handler.py +2 -0
handler.py
CHANGED
@@ -5,6 +5,8 @@ import torch
|
|
5 |
class EndpointHandler():
|
6 |
def __init__(self, path=""):
|
7 |
self.tokenizer = AutoTokenizer.from_pretrained(path)
|
|
|
|
|
8 |
self.model = AutoModelForSeq2SeqLM.from_pretrained(path)
|
9 |
|
10 |
def __call__(self, data: str) -> str:
|
|
|
5 |
class EndpointHandler():
|
6 |
def __init__(self, path=""):
|
7 |
self.tokenizer = AutoTokenizer.from_pretrained(path)
|
8 |
+
self.tokenizer.src_lang = "en"
|
9 |
+
self.tokenizer.tgt_lang = "ta"
|
10 |
self.model = AutoModelForSeq2SeqLM.from_pretrained(path)
|
11 |
|
12 |
def __call__(self, data: str) -> str:
|