Update handler.py
Browse files- 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
|