import gradio as gr from transformers import pipeline pipe = pipeline('text-classification', model='marcelovidigal/ModernBERT-base-2-contract-sections-classification-v4-10-max') def executar_predicao(texto): return pipe(texto) app = gr.Interface( fn=executar_predicao, inputs='text', outputs='json', ) app.launch()