File size: 228 Bytes
e1e9d81
a294fac
e1e9d81
 
 
a294fac
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
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 ()