Kalaoke commited on
Commit
a79dc31
·
1 Parent(s): 05f6b94

add custom handler and modify pipeline

Browse files
Files changed (2) hide show
  1. __pycache__/handler.cpython-37.pyc +0 -0
  2. handler.py +1 -1
__pycache__/handler.cpython-37.pyc CHANGED
Binary files a/__pycache__/handler.cpython-37.pyc and b/__pycache__/handler.cpython-37.pyc differ
 
handler.py CHANGED
@@ -61,7 +61,7 @@ class EndpointHandler():
61
 
62
  if label == '0' and score >= 0.75:
63
  label = 2
64
- return {"label":label, "score": score}
65
  else:
66
  prediction_s = self.classifier_s(inputs)
67
  label = prediction_s[0]['label']
 
61
 
62
  if label == '0' and score >= 0.75:
63
  label = 2
64
+ return [{"label":label, "score": score}]
65
  else:
66
  prediction_s = self.classifier_s(inputs)
67
  label = prediction_s[0]['label']