hlky HF staff commited on
Commit
ffd5f31
·
verified ·
1 Parent(s): f6f5127

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -13,8 +13,8 @@ def prepare_tensor(tensor: torch.Tensor) -> Tuple[str, List[int], str]:
13
  return tensor_data, shape, dtype
14
 
15
 
16
- def unpack_tensor(tensor_data: str, shape: List[int], dtype: str) -> torch.Tensor:
17
- tensor = base64.b64decode(tensor_data.encode("utf-8"))
18
  DTYPE_MAP = {
19
  "float16": torch.float16,
20
  "float32": torch.float32,
 
13
  return tensor_data, shape, dtype
14
 
15
 
16
+ def unpack_tensor(tensor_data: bytes, shape: List[int], dtype: str) -> torch.Tensor:
17
+ tensor = tensor_data
18
  DTYPE_MAP = {
19
  "float16": torch.float16,
20
  "float32": torch.float32,