Team Ai
Apppublic

Amrrs/gradio-sentiment-analyzer

sourceHugging Faceupdated 5y agoView on Hugging Face
2likes
app.py16 linesDownload Raw Back to root
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, 11                     inputs = "text", 12                     outputs = ['text'],13                     title = 'Sentiment Analysis', 14                     description="Get Sentiment Negative/Positive for the given input")15                     16iface.launch(inline = False)