CallmeKaito commited on
Commit
ad49fb5
·
verified ·
1 Parent(s): 99730cf

Create export_model.py

Browse files
Files changed (1) hide show
  1. export_model.py +7 -0
export_model.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import torch
2
+
3
+ # Load the model
4
+ model = VisionEncoderDecoderModel.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
5
+
6
+ # Save the model state dictionary
7
+ torch.save(model.state_dict(), "model.pth")