Spaces:
Sleeping
Sleeping
ayoni02
commited on
Commit
·
6b74b06
1
Parent(s):
7db39be
NA VICTOR O
Browse files
app.py
CHANGED
|
@@ -10,10 +10,10 @@ classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnl
|
|
| 10 |
|
| 11 |
def main():
|
| 12 |
text = st.text_input("Enter the text to classify: ") #input("Enter the text to classify: ")
|
| 13 |
-
labels = ["
|
| 14 |
if text:
|
| 15 |
results = classifier(text, labels)
|
| 16 |
-
st.write(results['sequence'])
|
| 17 |
st.write(results['labels'])
|
| 18 |
st.write(results['scores'])
|
| 19 |
else:
|
|
|
|
| 10 |
|
| 11 |
def main():
|
| 12 |
text = st.text_input("Enter the text to classify: ") #input("Enter the text to classify: ")
|
| 13 |
+
labels = ["TOXIC", "AGGRESSIVE", "HATE SPEECH", "INSULTIVE", "SPAM", "NSFW" "NEUTRAL"]
|
| 14 |
if text:
|
| 15 |
results = classifier(text, labels)
|
| 16 |
+
#st.write(results['sequence'])
|
| 17 |
st.write(results['labels'])
|
| 18 |
st.write(results['scores'])
|
| 19 |
else:
|