File size: 387 Bytes
7f81307
 
7179214
 
7f81307
 
7179214
3e1c304
 
1ea0270
41b1885
 
3e1c304
1ea0270
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)