Spaces:
Sleeping
Sleeping
File size: 554 Bytes
2efbb7e ea55c47 2efbb7e ea55c47 2efbb7e ea55c47 2efbb7e ea55c47 a4956e9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import streamlit as st
# from transformers import pipeline
# pipe = pipeline("text-classification", model="Beehzod/smart_sentiment_analysis")
# text = st.text_area('enter text: ')
# if text:
# out = pipe(text)
# st.json(out)
from transformers import pipeline
sentiment_pipeline = pipeline("sentiment-analysis", model="Beehzod/smart_sentiment_analysis")
text = st.text_area('enter text: ')
results = sentiment_pipeline(text)
for result in results:
#print(f"Label: {result['label']}, Score: {result['score']:.4f}")
st.json(result) |