Commit
·
bc9b616
1
Parent(s):
02fd376
Update script
Browse files
script
CHANGED
@@ -2,8 +2,8 @@ import torch
|
|
2 |
from transformers import DistilBertTokenizer, DistilBertModel
|
3 |
|
4 |
# Load the tokenizer and model
|
5 |
-
tokenizer = DistilBertTokenizer.from_pretrained("
|
6 |
-
model = DistilBertModel.from_pretrained("
|
7 |
|
8 |
# Define the inference function
|
9 |
def predict(text):
|
|
|
2 |
from transformers import DistilBertTokenizer, DistilBertModel
|
3 |
|
4 |
# Load the tokenizer and model
|
5 |
+
tokenizer = DistilBertTokenizer.from_pretrained("tokenizer_config.json")
|
6 |
+
model = DistilBertModel.from_pretrained("pytorch_model.bin")
|
7 |
|
8 |
# Define the inference function
|
9 |
def predict(text):
|