Spaces:
Sleeping
Sleeping
import streamlit as st | |
from transformers import pipeline | |
classifier = pipeline("text-classification", model="model") | |
st.title("TONE DETECTION | BCS WINTER PROJECT") | |
st.write("Enter a sentence to analyze text's Tone:") | |
user_input = st.text_input("") | |
if user_input: | |
pred = classifier(user_input) | |
tone = pred[0]['label'].upper() | |
score = pred[0]['score']*100 | |
st.write("TONE :- ",tone) | |
st.write("SCORE :- ",score,"%") | |