import gradio as gr from sentiwordnet_calculator import SentimentPipeline pipe = SentimentPipeline("Tanor/SRGPTSENTPOS2", "Tanor/SRGPTSENTNEG2") def calculate(text): return pipe(text) iface = gr.Interface(fn=calculate, inputs="text", outputs="text") iface.launch()