Uan Sholanbayev commited on
Commit
9edfae2
1 Parent(s): 9ef518f

added model

Browse files
Files changed (2) hide show
  1. bert_lr.pkl +0 -0
  2. handler.py +1 -1
bert_lr.pkl ADDED
Binary file (6.86 kB). View file
 
handler.py CHANGED
@@ -16,7 +16,7 @@ def unpickle_obj(filepath):
16
 
17
  class EndpointHandler():
18
  def __init__(self, path=""):
19
- self.model = unpickle_obj(path)
20
  self.tokenizer = BertTokenizer.from_pretrained(os.getcwd(), local_files_only=True)
21
  self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
22
  self.bert = BertModel.from_pretrained(os.getcwd()).to(self.device)
 
16
 
17
  class EndpointHandler():
18
  def __init__(self, path=""):
19
+ self.model = unpickle_obj(f"{os.getcwd()}/bert_lr.pkl")
20
  self.tokenizer = BertTokenizer.from_pretrained(os.getcwd(), local_files_only=True)
21
  self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
22
  self.bert = BertModel.from_pretrained(os.getcwd()).to(self.device)