roshbeed commited on
Commit
dae3897
·
verified ·
1 Parent(s): c09b32b

Upload src/upload_to_hf.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. src/upload_to_hf.py +6 -6
src/upload_to_hf.py CHANGED
@@ -62,13 +62,13 @@ def upload_to_huggingface(repo_name, token):
62
  repo_type="model"
63
  )
64
 
65
- # Upload vocabulary and tokenizer files
66
- vocab_files = glob.glob('cbow/*.pkl')
67
- for vocab_file in vocab_files:
68
- print(f"Uploading {vocab_file}...")
69
  api.upload_file(
70
- path_or_fileobj=vocab_file,
71
- path_in_repo=f"vocabulary/{os.path.basename(vocab_file)}",
72
  repo_id=repo_name,
73
  repo_type="model"
74
  )
 
62
  repo_type="model"
63
  )
64
 
65
+ # Upload all tokenizer files from cbow directory
66
+ cbow_files = glob.glob('cbow/*.pkl')
67
+ for cbow_file in cbow_files:
68
+ print(f"Uploading {cbow_file}...")
69
  api.upload_file(
70
+ path_or_fileobj=cbow_file,
71
+ path_in_repo=f"cbow/{os.path.basename(cbow_file)}",
72
  repo_id=repo_name,
73
  repo_type="model"
74
  )