CIAZIZ commited on
Commit
1aee5e6
·
verified ·
1 Parent(s): f3ad11e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,7 +9,8 @@ def analyze(message):
9
  result = result[0]
10
  label = result['label']
11
  score = result['score'] * 100
12
- return f"{label}, {score}"
 
13
 
14
  start = gr.Interface(fn=analyze, inputs="text", outputs="text")
15
  start.launch(debug=True)
 
9
  result = result[0]
10
  label = result['label']
11
  score = result['score'] * 100
12
+ score = round(score, 2)
13
+ return f"{label}, {score}%"
14
 
15
  start = gr.Interface(fn=analyze, inputs="text", outputs="text")
16
  start.launch(debug=True)