TheDemond commited on
Commit
5f5e576
·
verified ·
1 Parent(s): 279fe8e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -25,6 +25,7 @@ def pre_processor(text):
25
 
26
  def post_processor(raw_output):
27
  label = (raw_output >= 0.5).int()
 
28
  return idx_to_cls[label.item()].capitalize(), round(raw_output.item(), 2)
29
 
30
 
 
25
 
26
  def post_processor(raw_output):
27
  label = (raw_output >= 0.5).int()
28
+ raw_output = raw_output if label else 1-raw_output
29
  return idx_to_cls[label.item()].capitalize(), round(raw_output.item(), 2)
30
 
31