Erfan11 commited on
Commit
20f3472
1 Parent(s): 7c4d56b

Update tf_model.h5

Browse files
Files changed (1) hide show
  1. tf_model.h5 +6 -4
tf_model.h5 CHANGED
@@ -1,5 +1,7 @@
1
- from transformers import TFBertForSequenceClassification
2
 
3
- model_name = "Erfan11/Neuracraft"
4
- model = TFBertForSequenceClassification.from_pretrained(model_name, from_tf=True, use_auth_token="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")
5
- # Ensure TensorFlow models are properly saved and loaded as needed.
 
 
 
1
+ from transformers import AutoModelForCausalLM, AutoTokenizer
2
 
3
+ def load_model():
4
+ model_name = "Erfan11/Neuracraft"
5
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
6
+ model = AutoModelForCausalLM.from_pretrained(model_name)
7
+ return model, tokenizer