sachacks2023 / app.py
keerthi4's picture
Update app.py
58e8263
raw
history blame
310 Bytes
import streamlit as st
from transformers import pipeline
from transformers import BertTokenizer
text = st.text_area('enter some text:')
classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", return_all_scores=True)
if text:
out = classifier(text)
st.json(out)