File size: 397 Bytes
c82003d
 
 
ed8d668
 
282367b
ed8d668
 
8182de5
f87dde4
b3948e3
ed8d668
1
2
3
4
5
6
7
8
9
10
11
12
13
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