File size: 332 Bytes
a3f12df aa7df82 a3f12df aa7df82 75e2d3f 6a6ddb1 66b4a7c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import streamlit as st
from transformers import pipeline
model_name = "SamLowe/roberta-base-go_emotions"
pipe = pipeline(task="text-classification", model=model_name)
user_text = st.text_area("Explain your feelings here")
if user_text:
emotion = pipe(user_text)
st.markdown("You are feeling like ")
st.json(emotion)
|