Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
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 |
|