File size: 345 Bytes
4cb4ffd
9446bb9
4cb4ffd
 
 
9446bb9
 
 
80e17cb
 
 
 
 
 
 
 
9446bb9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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="Sentiment Analysis",
    description="Get a sentimental analysis for the provided text"
)

demo.launch()