Spaces:
Sleeping
Sleeping
import pandas as pd | |
from transformers import pipeline | |
import gradio as gr | |
# Initialize sentiment analysis pipeline | |
sentiment_pipeline = pipeline('sentiment-analysis') | |
def analyze_text(text): | |
sentiment = sentiment_pipeline(text)[0] | |
return sentiment['label'] | |
iface = gr.Interface(fn=analyze_text, inputs=gr.inputs.Textbox(lines=13, label="Enter Text"), outputs="text") | |
iface.launch() | |