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