File size: 225 Bytes
f40efc4
f554396
f40efc4
 
add489d
f554396
e14944a
861aaa1
3e890db
 
1
2
3
4
5
6
7
8
9
10
11
from transformers import pipeline
import gradio as gr

pipe = pipeline("sentiment-analysis")

def get_sentiment(input):
  return pipe(input)

demo=gr.Interface(fn=get_sentiment, inputs="text", outputs=["text"])
demo.launch()