mrosinski commited on
Commit
60e56d7
1 Parent(s): 5e35cdc

updated output labels

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -20,7 +20,8 @@ A worker was using a grinder in a confined space when he became dizzy from the f
20
 
21
  def predict(txt):
22
  pred,_,probs = learn.predict(txt)
23
- return {labels[i]: float(probs[i]) for i in range(1)}
 
24
  #return learn.predict(txt)
25
  # formating of return f"Rating: {pred} prob: float(probs[pred_idx[i]]"
26
  #return f'{pred}'
 
20
 
21
  def predict(txt):
22
  pred,_,probs = learn.predict(txt)
23
+ return {labels[i]: float(probs[i]) for i in range(len(labels))}
24
+ # return {labels[i]: float(probs[i]) for i in range(1)}
25
  #return learn.predict(txt)
26
  # formating of return f"Rating: {pred} prob: float(probs[pred_idx[i]]"
27
  #return f'{pred}'