Team Ai
Apppublic

Riddhi/Sentiment-Analysis

sourceHugging Faceupdated 5y agoView on Hugging Face
0likes
app.py13 linesDownload Raw Back to root
1import gradio as gr2from transformers import pipeline3 4sentiment = pipeline("sentiment-analysis")5def get_sentiment(input_text):6  return sentiment(input_text)7  8iface = gr.Interface(fn = get_sentiment, 9                     inputs = "text", 10                     outputs = ['text'],11                     title = 'Sentiment Analysis', 12                     description="Get Sentiment Negative/Positive for the given input")13iface.launch(inline = False)