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() |