from transformers import pipeline import gradio as gr pipe = pipeline("text-classification", model="agentlans/snowflake-arctic-xs-grammar-classifier") def process(text): predictions = pipe(text) return predictions demo = gr.Interface( fn=process, inputs=["text"], outputs=["text"], ) demo.launch()