File size: 472 Bytes
7f8de92 68826e9 1188df8 0f64e73 854d0de b3d7546 d6fbb90 854d0de 2cd8647 71af36e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import streamlit as st
from transformers import pipeline
st.title("Milestone #2")
text = st.text_input("write a statement")
import streamlit as st
options = ["zero-shot-classification", "nill", "nill3"]
selected_option = st.selectbox("Select an option", options)
model = st.write("You selected:", selected_option)
con = st.button("submit")
if con:
classifier = pipeline(model)
res = classifier(text, candidate_labels= ["offensive"],)
print(res)
st.write(res)
|