Gregoryjr commited on
Commit
854d0de
·
unverified ·
1 Parent(s): 1188df8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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
- classifier = pipeline("zero-shot-classification")
6
- res = classifier(text, cata = ["offensive"],)
7
- print(res)
8
- st.button("submit")
 
 
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