Spaces:
Runtime error

File size: 469 Bytes
4928d51
 
 
 
 
 
 
 
2930dd4
4928d51
 
 
 
 
 
 
 
2930dd4
 
 
4928d51
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import streamlit as st
from transformers import pipeline

# Load the sentiment analysis pipeline
classifier = pipeline("text-generation")

# Streamlit app
def main():
    st.title("Text Generation App")

    # User input
    user_input = st.text_input("Enter a sentence:")

    if user_input:
        # Perform sentiment analysis
        result = classifier(user_input)

        # Display results
        st.write(result)
        
if __name__ == "__main__":
    main()