KhairulAmirinUM commited on
Commit
2963a5f
·
1 Parent(s): 95aef6a
Files changed (1) hide show
  1. src/hf.py +1 -1
src/hf.py CHANGED
@@ -2,7 +2,7 @@ from transformers import BertTokenizer, BertForSequenceClassification,TextClassi
2
  # Load tokenizer and model from the fine-tuned directory
3
  model_path = 'intent_classification/TinyBERT_106_V2' # can try other checkpoints
4
 
5
- tokenizer = BertTokenizer.from_pretrained(model_path)
6
  # model = BertForSequenceClassification.from_pretrained(model_path)
7
  model = AutoModelForSequenceClassification.from_pretrained(model_path)
8
 
 
2
  # Load tokenizer and model from the fine-tuned directory
3
  model_path = 'intent_classification/TinyBERT_106_V2' # can try other checkpoints
4
 
5
+ tokenizer = BertTokenizer.from_pretrained(model_path, local_files_only=True)
6
  # model = BertForSequenceClassification.from_pretrained(model_path)
7
  model = AutoModelForSequenceClassification.from_pretrained(model_path)
8