import gradio as gr from transformers import pipeline pipe = pipeline("text-classification", model="airesearch/wangchanbart-large", tokenizer="airesearch/wangchanbart-large" revision="finetuned@wisesight_sentiment" ) def predict(text): return pipe(text) demo = gr.Interface( fn=predict, inputs='text', outputs='text', ) demo.launch()