File size: 325 Bytes
6dce6ee b57e0c2 6dce6ee af25857 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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()
|