Spaces:
Runtime error
Runtime error
Commit
·
d5960c1
1
Parent(s):
445c4f7
add zeroshot model
Browse files- downloadModel.py +22 -10
downloadModel.py
CHANGED
@@ -1,13 +1,25 @@
|
|
1 |
from transformers import AutoModelForSequenceClassification,AutoTokenizer
|
2 |
|
3 |
-
|
4 |
-
###FOR SENTIMENT CLASSIFICATION
|
5 |
-
chkpt='distilbert-base-uncased-finetuned-sst-2-english'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
#
|
11 |
-
model.
|
12 |
-
tokenizer.
|
13 |
-
|
|
|
|
|
|
|
|
|
|
1 |
from transformers import AutoModelForSequenceClassification,AutoTokenizer
|
2 |
|
3 |
+
# ##***********************************************************************************************************##
|
4 |
+
# ###FOR SENTIMENT CLASSIFICATION
|
5 |
+
# chkpt='distilbert-base-uncased-finetuned-sst-2-english'
|
6 |
+
#
|
7 |
+
# model=AutoModelForSequenceClassification.from_pretrained(chkpt)
|
8 |
+
# tokenizer=AutoTokenizer.from_pretrained(chkpt)
|
9 |
+
#
|
10 |
+
# #save the pertrained model
|
11 |
+
# model.save_pretrained('sentiment_classifier/')
|
12 |
+
# tokenizer.save_pretrained('sentiment_classifier/')
|
13 |
+
# ##***********************************************************************************************************##
|
14 |
|
15 |
+
# # ##***********************************************************************************************************##
|
16 |
+
# # ###FOR Zero Shot Text Classification
|
17 |
+
# chkpt='valhalla/distilbart-mnli-12-1'
|
18 |
+
#
|
19 |
+
# model=AutoModelForSequenceClassification.from_pretrained(chkpt)
|
20 |
+
# tokenizer=AutoTokenizer.from_pretrained(chkpt)
|
21 |
+
#
|
22 |
+
# #save the pertrained model
|
23 |
+
# model.save_pretrained('zero_shot_clf/')
|
24 |
+
# tokenizer.save_pretrained('zero_shot_clf/')
|
25 |
+
# # ##***********************************************************************************************************##
|