File size: 391 Bytes
7f81307
 
7179214
 
7f81307
 
7179214
3e1c304
 
85f867b
3e1c304
 
 
 
 
cec5757
3e1c304
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)