WUJUNCHAO commited on
Commit
8ec8428
1 Parent(s): ecedb47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -7,6 +7,7 @@ def greet(text):
7
  data = pipe(text)[0]
8
  label = data["label"]
9
  score = data["score"]
10
- return f"The text is {label}, with {score} confidence score@"
 
11
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
12
  iface.launch()
 
7
  data = pipe(text)[0]
8
  label = data["label"]
9
  score = data["score"]
10
+ score = score * 100
11
+ return f"The text is {label}, with {score:.1f}% possibility."
12
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
13
  iface.launch()