Team Ai
Apppublic

Ignahugging/Sentiment-Analysis

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