khan123 commited on
Commit
5d38e69
1 Parent(s): cdf69a2

Update utils/postprocess.py

Browse files
Files changed (1) hide show
  1. 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'))}