testmodel / README.md
rkenji's picture
Upload modelo treinado - 20251205_140224_hf
17ce0e0
|
Raw
History Blame
7.67 kB
metadata
datasets:
  - legal_documents
language: pt
license: apache-2.0
tags:
  - text-classification
  - legal
  - bert
  - portuguese
  - brazilian-legal-documents
model-index:
  - name: testmodel
    results:
      - task:
          type: text-classification
        dataset:
          name: Legal Documents Classification Dataset
          type: legal_documents
        metrics:
          - type: accuracy
            value: 0.9124293785310734
          - type: f1
            value: 0.9069008258581538
          - type: precision
            value: 0.9052447065095824
          - type: recall
            value: 0.9124293785310734
          - type: f1_macro
            value: 0.6832937813302449

Model Card for Model ID

Model Details

Model Description

Modelo de Classificação de Documentos Jurídicos

Este modelo foi treinado para classificar documentos jurídicos brasileiros usando BERT multilíngue.

Detalhes do Modelo

  • Base Model: google-bert/bert-base-multilingual-cased
  • Tipo: Classificação Multiclasse
  • Número de Classes: 8
  • Idioma: Português (Brasil)
  • Domínio: Documentos Jurídicos

Classes

  1. Alvará
  2. Sentença
  3. Penhora/Arresto/Sequestro
  4. Citação
  5. Art.40
  6. Não
  7. Teste
  8. Teste 2

Métricas de Avaliação

As métricas abaixo foram calculadas no conjunto de validação:

  • Accuracy: 0.9124
  • F1-Score (Weighted): 0.9069
  • Precision (Weighted): 0.9052
  • Recall (Weighted): 0.9124
  • F1-Score (Macro): 0.6833

Classification Report Completo

              precision    recall  f1-score   support

           0       0.00      0.00      0.00         7
           1       0.94      0.98      0.96        48
           2       0.95      0.72      0.82        57
           3       0.82      0.95      0.88        42
           4       0.88      0.95      0.91       132
           5       0.94      0.95      0.94       408
           6       0.40      0.33      0.36         6
           7       0.56      0.62      0.59         8

    accuracy                           0.91       708
   macro avg       0.69      0.69      0.68       708
weighted avg       0.91      0.91      0.91       708

Uso

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

# Carregar modelo e tokenizer
model = AutoModelForSequenceClassification.from_pretrained("rkenji/testmodel")
tokenizer = AutoTokenizer.from_pretrained("rkenji/testmodel")

# Fazer predição
texto = "Seu texto jurídico aqui"
inputs = tokenizer(texto, return_tensors="pt", truncation=True, max_length=512)
outputs = model(**inputs)
prediction = torch.argmax(outputs.logits, dim=1).item()

print(f"Classe predita: {prediction}")

Treinamento

O modelo foi treinado com early stopping e validação cruzada em um dataset de documentos jurídicos brasileiros.

  • Developed by: [More Information Needed]
  • Funded by [optional]: [More Information Needed]
  • Shared by [optional]: [More Information Needed]
  • Model type: [More Information Needed]
  • Language(s) (NLP): pt
  • License: apache-2.0
  • Finetuned from model [optional]: [More Information Needed]

Model Sources [optional]

  • Repository: [More Information Needed]
  • Paper [optional]: [More Information Needed]
  • Demo [optional]: [More Information Needed]

Uses

Direct Use

[More Information Needed]

Downstream Use [optional]

[More Information Needed]

Out-of-Scope Use

[More Information Needed]

Bias, Risks, and Limitations

[More Information Needed]

Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

How to Get Started with the Model

Use the code below to get started with the model.

[More Information Needed]

Training Details

Training Data

[More Information Needed]

Training Procedure

Preprocessing [optional]

[More Information Needed]

Training Hyperparameters

  • Training regime: [More Information Needed]

Speeds, Sizes, Times [optional]

[More Information Needed]

Evaluation

Testing Data, Factors & Metrics

Testing Data

[More Information Needed]

Factors

[More Information Needed]

Metrics

[More Information Needed]

Results

[More Information Needed]

Summary

Model Examination [optional]

[More Information Needed]

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: [More Information Needed]
  • Hours used: [More Information Needed]
  • Cloud Provider: [More Information Needed]
  • Compute Region: [More Information Needed]
  • Carbon Emitted: [More Information Needed]

Technical Specifications [optional]

Model Architecture and Objective

[More Information Needed]

Compute Infrastructure

[More Information Needed]

Hardware

[More Information Needed]

Software

[More Information Needed]

Citation [optional]

BibTeX:

[More Information Needed]

APA:

[More Information Needed]

Glossary [optional]

[More Information Needed]

More Information [optional]

[More Information Needed]

Model Card Authors [optional]

[More Information Needed]

Model Card Contact

[More Information Needed]