import gradio as gr from transformers import AutoModel, pipeline access_token = "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" model = AutoModel.from_pretrained("EkhiAzur/RoBERTA_3", token=access_token) classifier = pipeline("text-classification", model=model, max_length=512, padding=True, truncation=True, batch_size=1) def prozesatu(testua): prediction = prozesatu.classifier(testua) return f'C1:{prediction["label"]}. Probabilitatea:{prediction["score"]}' gr.Interface(fn=prozesatu, inputs="text", outputs="text").launch()