simonschoe commited on
Commit
27b2a2c
1 Parent(s): 48bd702

correct rounding

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -17,8 +17,7 @@ def classify(_input):
17
  wrapper method to compute label 1 probability and explanation for given input
18
  """
19
  result = classifier(_input)[0]
20
- score = round(result['score'], 4)
21
- print(score)
22
  if result['label'] == 'LABEL_0':
23
  score = 1 - score
24
 
@@ -31,7 +30,7 @@ def classify(_input):
31
 
32
  # adding legend to word importance explanation
33
  result_html = explanation + legend
34
- return score, result_html
35
 
36
  app = gr.Blocks()
37
 
 
17
  wrapper method to compute label 1 probability and explanation for given input
18
  """
19
  result = classifier(_input)[0]
20
+ score = result['score']
 
21
  if result['label'] == 'LABEL_0':
22
  score = 1 - score
23
 
 
30
 
31
  # adding legend to word importance explanation
32
  result_html = explanation + legend
33
+ return round(score, 4), result_html
34
 
35
  app = gr.Blocks()
36