File size: 444 Bytes
852a167
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from transformers import pipeline
import gradio as gr

sentiment = pipeline("sentiment-analysis")

def sentiment_getter(input_text):
    return sentiment(input_text)

iface = gr.Interface(fn = sentiment_getter,
                    input = 'text' ,
                    outputs = ["text"],
                    title = "sentiment analysis" ,
                    description = "this app is analyze out sentence and give the results")
iface.launch()