databoyface commited on
Commit
03d8f7f
·
verified ·
1 Parent(s): c6ddf1b

Add score to results

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ pipeline = pipeline(task="text-classification", model="databoyface/distilbert-ba
5
 
6
  def predict(input_txt):
7
  predictions = pipeline(input_txt)
8
- return {p["label"] for p in predictions}
9
 
10
  gradio_app = gr.Interface(
11
  fn=predict,
 
5
 
6
  def predict(input_txt):
7
  predictions = pipeline(input_txt)
8
+ return {p["label"]: p["score"] for p in predictions}
9
 
10
  gradio_app = gr.Interface(
11
  fn=predict,