ashishraics commited on
Commit
884971a
·
1 Parent(s): a48f2db

delete download script

Browse files
Files changed (2) hide show
  1. downloadModel.py +0 -25
  2. sentiment_clf_helper.py +1 -1
downloadModel.py DELETED
@@ -1,25 +0,0 @@
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
- # # ##***********************************************************************************************************##
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
sentiment_clf_helper.py CHANGED
@@ -11,7 +11,7 @@ from transformers import AutoModelForSequenceClassification,AutoTokenizer
11
  chkpt='distilbert-base-uncased-finetuned-sst-2-english'
12
  model=AutoModelForSequenceClassification.from_pretrained(chkpt)
13
  tokenizer=AutoTokenizer.from_pretrained(chkpt)
14
- # tokenizer=AutoTokenizer.from_pretrained('sentiment_classifier/')
15
 
16
  def classify_sentiment(texts,model,tokenizer):
17
  """
 
11
  chkpt='distilbert-base-uncased-finetuned-sst-2-english'
12
  model=AutoModelForSequenceClassification.from_pretrained(chkpt)
13
  tokenizer=AutoTokenizer.from_pretrained(chkpt)
14
+
15
 
16
  def classify_sentiment(texts,model,tokenizer):
17
  """