Spaces:
Runtime error
Runtime error
Rob Caamano
commited on
App 2.12
Browse files
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
|
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)
|