SampleTrial / app.py
karthick0812's picture
Update app.py
8182de5 verified
raw
history blame contribute delete
No virus
397 Bytes
import streamlit as st
from transformers import pipeline
st.title('Sentence Emotion Teller')
classifier = pipeline(task="text-classification", model="SamLowe/roberta-base-go_emotions", top_k=None)
sentences = st.text_input('Enter Your Sentences')
if st.button('Submit'):
model_outputs = classifier(sentences)
st.write(model_outputs[0])
# produces a list of dicts for each of the labels