Spaces:
Sleeping
Sleeping
File size: 576 Bytes
ffd4428 335f18b ffd4428 335f18b a5643e3 d2b35f2 fa0b08d 35f5bf3 ebd8530 fa0b08d 35f5bf3 a716b14 6fa920b 010cbc6 d656ec6 787f0bf fa0b08d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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)
result_label = ''
result_label= result['label']
st.write("label:", result_label)
st.write("score:", result['socre'])
|