import gradio as gr from transformers import pipeline pipe = pipeline("sentiment-analysis") def analyze(input): return pipe(input) interface = gr.Interface(fn=analyze, inputs="text", outputs="text", title="Simple Sentiment Analysis") interface.launch()