Create hf_model/pytorch_model.bin
Browse files
hf_model/pytorch_model.bin
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import BertForSequenceClassification
|
| 2 |
+
|
| 3 |
+
model = BertForSequenceClassification.from_pretrained('bert-base-uncased', num_labels=2)
|
| 4 |
+
model.save_pretrained('./hf_model')
|