Spaces:
Sleeping
Sleeping
import streamlit as st | |
from transformers import pipeline | |
pipe = pipeline(task="sentiment-analysis") | |
st.title("Toxic Tweets Analyzer") | |
#initial | |
text = st.text_area("enter some text") | |
#form | |
with st.form("my_form"): | |
submitted = st.form_submit_button("Submit") | |
if submitted: | |
st.write("Form submitted!") | |
if text: | |
out = pipe(text) | |
st.json(out) | |