import gradio as gr from transformers import pipeline pipe = pipeline('sentiment-analysis') text = gr.TextArea('enter some text!') if text: out = pipe(text) gr.json(out)