Spaces:
Running
Running
import streamlit as st | |
from transformers import pipeline | |
pipe = pipeline(task="sentiment-analysis") | |
st.title("Toxic Tweets Analyzer") | |
#form | |
with st.form("my_form"): | |
submitted = st.form_submit_button("Analyze") | |
st.text_area("enter tweet here:") | |
text = st.write("i'm nice at ping pong") | |
if submitted: | |
# display text | |
out = pipe(text) | |
st.json(out) | |