Spaces:
Runtime error
Runtime error
Oliver Li
commited on
Commit
·
ffe0ff7
1
Parent(s):
c193e45
bug fix
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ if st.button("Analyze"):
|
|
55 |
else:
|
56 |
with st.spinner("Analyzing toxicity..."):
|
57 |
if selected_model == "Olivernyu/finetuned_bert_base_uncased":
|
58 |
-
toxicity_detector =
|
59 |
outputs = toxicity_detector(text, top_k=2)
|
60 |
category_names = ["toxic", "severe_toxic", "obscene", "threat", "insult", "identity_hate"]
|
61 |
results = []
|
|
|
55 |
else:
|
56 |
with st.spinner("Analyzing toxicity..."):
|
57 |
if selected_model == "Olivernyu/finetuned_bert_base_uncased":
|
58 |
+
toxicity_detector = load_model(selected_model)
|
59 |
outputs = toxicity_detector(text, top_k=2)
|
60 |
category_names = ["toxic", "severe_toxic", "obscene", "threat", "insult", "identity_hate"]
|
61 |
results = []
|