Spaces:
Paused
Paused
Update utils/postprocess.py
Browse files- utils/postprocess.py +3 -3
utils/postprocess.py
CHANGED
@@ -8,6 +8,6 @@ def text_mapping(model_output,text_label):
|
|
8 |
'sentiment' : sent}
|
9 |
|
10 |
def text_encoding(output):
|
11 |
-
return {'label' : output['label'].encode(encoding='UTF-8', errors='strict'),
|
12 |
-
'text' : output['text'].encode(encoding='UTF-8', errors='strict'),
|
13 |
-
'sentiment' : output['sentiment'].encode(encoding='UTF-8', errors='strict')}
|
|
|
8 |
'sentiment' : sent}
|
9 |
|
10 |
def text_encoding(output):
|
11 |
+
return {'label' : str(output['label'].encode(encoding='UTF-8', errors='strict')),
|
12 |
+
'text' : str(output['text'].encode(encoding='UTF-8', errors='strict')),
|
13 |
+
'sentiment' : str(output['sentiment'].encode(encoding='UTF-8', errors='strict'))}
|