File size: 314 Bytes
45d31ac
b7d0f5f
45d31ac
 
 
b7d0f5f
 
 
c069642
b7d0f5f
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"],title="AI Workshop",description="Input a text and get a Positive/Negative sentiment")
demo.launch()