pre-class-test / app.py
Zack
adding emotion classifier to the app
197d71a
raw
history blame contribute delete
329 Bytes
import streamlit as st
from transformers import pipeline
model="SamLowe/roberta-base-go_emotions"
pipe = pipeline("text-classification", model=model)
input_text = st.text_area('Tell me how your day was and I will guess how you are feeling...')
if input_text:
classification = pipe(input_text)
st.json(classification)