File size: 352 Bytes
5653935
 
47cdb11
5653935
991eece
0d9ea28
0b518e4
 
 
 
1
2
3
4
5
6
7
8
9
10
import streamlit as st
from transformers import pipeline
from transformers import BertTokenizer

text = st.text_area('Sentiment Analysis Model - SacHacks2023 | Text to analyze:')
classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", return_all_scores=True)

if text:
  out = classifier(text)
  st.json(out)