Spaces:
Sleeping
Sleeping
File size: 391 Bytes
0318d02 b934928 0318d02 87ea450 2f01084 87ea450 b934928 9d826e2 87ea450 b934928 87ea450 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import streamlit as st
from transformers import pipeline
# Define the pipeline and assign it to `pipe`
pipe = pipeline('sentiment-analysis')
# Create a text area for input
text = st.text_area('Enter Any Text That comes in Your Mind!!')
# Process the text when the user inputs it
if text:
out = pipe(text) # Use the `pipe` variable here
st.json(out) # Display the result as JSON
|