andrewluo commited on
Commit
50d4118
1 Parent(s): 6126352

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -31,5 +31,5 @@ class EndpointHandler():
31
  # extract the non-zero values
32
  weights = vec[cols].cpu().tolist()
33
  # use to create a dictionary of token ID to weight
34
- sparse_dict = dict(zip(cols, weights))
35
  return sparse_dict
 
31
  # extract the non-zero values
32
  weights = vec[cols].cpu().tolist()
33
  # use to create a dictionary of token ID to weight
34
+ sparse_dict = dict(zip(map(str, cols), weights))
35
  return sparse_dict