hollywoodfrancis commited on
Commit
61ec2fe
·
verified ·
1 Parent(s): 191d106

Create tf_model.h5

Browse files
Files changed (1) hide show
  1. tf_model.h5 +10 -0
tf_model.h5 ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import TFGPT2LMHeadModel
2
+
3
+ # Load model
4
+ tf_model = TFGPT2LMHeadModel.from_pretrained("gpt2")
5
+
6
+ # Save TensorFlow model
7
+ tf_model.save_pretrained("LopezLLM", saved_model=False)
8
+
9
+ import os
10
+ print("Saved files:", os.listdir("LopezLLM"))