Rob Caamano commited on
Commit
84bfc73
·
unverified ·
1 Parent(s): 4388ac9
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -31,7 +31,7 @@ def get_highest_toxicity_class(prediction):
31
  return model.config.id2label[max_index], prediction[max_index]
32
 
33
  input = tokenizer(text, return_tensors="tf")
34
- prediction = model(input, return_dict=True).logits.numpy()[0]
35
 
36
  if st.button("Submit", type="primary"):
37
  label, probability = get_highest_toxicity_class(prediction)
 
31
  return model.config.id2label[max_index], prediction[max_index]
32
 
33
  input = tokenizer(text, return_tensors="tf")
34
+ prediction = model(input)[0].numpy()[0]
35
 
36
  if st.button("Submit", type="primary"):
37
  label, probability = get_highest_toxicity_class(prediction)