Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,8 @@ from transformers import RobertaTokenizer, AutoModelForSequenceClassification
|
|
3 |
import torch
|
4 |
|
5 |
# Chargement des modèles
|
6 |
-
state_dict_comment = torch.load("
|
7 |
-
state_dict_full = torch.load("
|
8 |
|
9 |
tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
|
10 |
model_comment = AutoModelForSequenceClassification.from_pretrained('roberta-base', problem_type="multi_label_classification", num_labels=3)
|
|
|
3 |
import torch
|
4 |
|
5 |
# Chargement des modèles
|
6 |
+
state_dict_comment = torch.load("fine_tuned_roberta_comments.bin", map_location=torch.device("cpu"))
|
7 |
+
state_dict_full = torch.load("fine_tuned_roberta.bin", map_location=torch.device("cpu"))
|
8 |
|
9 |
tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
|
10 |
model_comment = AutoModelForSequenceClassification.from_pretrained('roberta-base', problem_type="multi_label_classification", num_labels=3)
|