import gradio as gr from transformers import pipeline pipe=pipeline('sentiment-analysis') def sentiment_calssifir(text): return pipe(text) demo = gr.Interface(fn=sentiment_calssifir, inputs="text", outputs="json") demo.launch() # outputs="label", # title=title, # description=description, # live=True).launch(debug=True)