File size: 279 Bytes
10ce087
 
 
 
 
 
 
 
 
 
 
e197399
1
2
3
4
5
6
7
8
9
10
11
12
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)