Gregoryjr
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,10 @@ import streamlit as st
|
|
2 |
from transformers import pipeline
|
3 |
st.title("Milestone #2")
|
4 |
text = st.text_input("write a statement")
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
9 |
|
|
|
2 |
from transformers import pipeline
|
3 |
st.title("Milestone #2")
|
4 |
text = st.text_input("write a statement")
|
5 |
+
con = st.button("submit")
|
6 |
+
if con:
|
7 |
+
classifier = pipeline("zero-shot-classification")
|
8 |
+
res = classifier(text, cata = ["offensive"],)
|
9 |
+
print(res)
|
10 |
+
st.button("submit")
|
11 |
|