Heramb26 commited on
Commit
884893c
·
1 Parent(s): 0e52dae

Add tokenizer files for fine-tuned model

Browse files
Files changed (1) hide show
  1. checkpoint-2070/upload.py +11 -0
checkpoint-2070/upload.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from huggingface_hub import Repository
2
+
3
+ # Correct repository name (without the duplicated username)
4
+ repo = Repository(local_dir="model_repo", clone_from="Heramb26/tr-ocr-custom-checkpoints")
5
+
6
+ # Copy the checkpoint folder into the repository
7
+ import shutil
8
+ shutil.copytree("checkpoint-2070", "model_repo/checkpoint-2070", dirs_exist_ok=True)
9
+
10
+ # Push the files to the Hugging Face Model Hub
11
+ repo.push_to_hub(commit_message="Upload TR OCR custom model checkpoint")