Update readme.py
Browse files
readme.py
CHANGED
@@ -82,8 +82,8 @@ from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
|
82 |
def sigmoid(x):
|
83 |
return 1 / (1 + math.exp(-x))
|
84 |
|
85 |
-
tokenizer = AutoTokenizer.from_pretrained({model_name})
|
86 |
-
model = AutoModelForSequenceClassification.from_pretrained({model_name}, problem_type="multi_label_classification")
|
87 |
model.eval()
|
88 |
class_mapping = model.config.id2label
|
89 |
|
|
|
82 |
def sigmoid(x):
|
83 |
return 1 / (1 + math.exp(-x))
|
84 |
|
85 |
+
tokenizer = AutoTokenizer.from_pretrained("{model_name}")
|
86 |
+
model = AutoModelForSequenceClassification.from_pretrained("{model_name}", problem_type="multi_label_classification")
|
87 |
model.eval()
|
88 |
class_mapping = model.config.id2label
|
89 |
|