takanezawa commited on
Commit
a971cda
·
1 Parent(s): 473c7e6

Refactor handler.py to include max_length parameter in model.encode()

Browse files
__pycache__/handler.cpython-311.pyc CHANGED
Binary files a/__pycache__/handler.cpython-311.pyc and b/__pycache__/handler.cpython-311.pyc differ
 
handler.py CHANGED
@@ -27,7 +27,7 @@ class EndpointHandler():
27
  # encodeメソッドの実行前に時間を記録
28
  start_time = time.time()
29
 
30
- result = self.model.encode(inputs, return_dense=False, return_sparse=True)
31
 
32
  # encodeメソッドの実行後に時間を記録
33
  end_time = time.time()
 
27
  # encodeメソッドの実行前に時間を記録
28
  start_time = time.time()
29
 
30
+ result = self.model.encode(inputs, return_dense=False, return_sparse=True, max_length=1024)
31
 
32
  # encodeメソッドの実行後に時間を記録
33
  end_time = time.time()