Matt09Miao's picture
Update app.py
fa0b08d verified
raw
history blame
545 Bytes
import streamlit as st
# Use a pipeline as a high-level helper
from transformers import pipeline
toxic_model = pipeline("text-classification", model="Matt09Miao/GP5_tweet_toxic")
st.set_page_config(page_title="Generate Your Tweet and Toxicity Analysis")
st.header("Please input your Tweet for Toxicity Analysis :performing_arts:")
input = st.text_input("Please input your first word...")
if input is not None:
#Stage 1: Input to Tweet
st.text('Toxicity Analysis...')
result = toxic_model(input)
print(result)