afiz's picture
Update app.py
e197399
raw
history blame contribute delete
279 Bytes
from transformers import pipeline
def get_sentiment_analysis(text):
classifier = pipeline("sentiment-analysis")
return classifier(text)
# Gradio code
import gradio as gr
demo = gr.Interface(fn=get_sentiment_analysis, inputs="text", outputs="text")
demo.launch(share=True)