fix : path error
Browse files- helper_functions.py +3 -3
helper_functions.py
CHANGED
@@ -6,13 +6,13 @@ from typing import Optional
|
|
6 |
from torch import Tensor
|
7 |
|
8 |
# Load the model
|
9 |
-
model = BertForSequenceClassification.from_pretrained(
|
10 |
|
11 |
# Load the tokenizer
|
12 |
-
tokenizer = BertTokenizer.from_pretrained(
|
13 |
|
14 |
# Charger le label encoder
|
15 |
-
with open(
|
16 |
label_encoder = pickle.load(f)
|
17 |
|
18 |
class_labels = {
|
|
|
6 |
from torch import Tensor
|
7 |
|
8 |
# Load the model
|
9 |
+
model = BertForSequenceClassification.from_pretrained("bert/bertModel/saved_model")
|
10 |
|
11 |
# Load the tokenizer
|
12 |
+
tokenizer = BertTokenizer.from_pretrained("bert/bertModel/saved_tokenizer")
|
13 |
|
14 |
# Charger le label encoder
|
15 |
+
with open("bert/bertModel/label_encoder.pkl", "rb") as f:
|
16 |
label_encoder = pickle.load(f)
|
17 |
|
18 |
class_labels = {
|