dev114/sentiment-analysis
1
1import gradio as gr2 3from transformers import pipeline4 5sentiment = pipeline("sentiment-analysis")6 7def get_sentiment(input_text):8 return sentiment(input_text)9 10iface = gr.Interface(fn = get_sentiment, inputs = "text", outputs = ['text'], title ='Sentiment Analysis', description="Get Sentiment Negative/Positive for the given input")11iface.launch()