Spaces:
Sleeping
Sleeping
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="Tweet Toxicity Analysis") | |
st.header("Please input your Tweet for Toxicity Analysis :performing_arts:") | |
input = st.text_area("Enter a Tweer for analysis") | |
result = toxic_model(input) | |
# Display the result | |
st.write("Tweet:", input) | |
st.write("result", result[0]) | |