File size: 343 Bytes
c1a2f4d
7f90657
c1a2f4d
 
7f90657
 
 
 
 
 
 
 
 
c1a2f4d
 
7f90657
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import streamlit as st

from transformers import pipeline

# Initialize the sentiment analysis pipeline

pipe = pipeline('sentiment-analysis') 

# Create a text input area in the Streamlit app

text = st.text_area('Enter some text!') 

# Process the text and display the results if there's input

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