File size: 604 Bytes
592e96e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from huggingface_hub import HfApi 

state_path = '/home/jovyan/simson_training_bolgov/simson_checkpoints_1M/checkpoint_best_model.bin'

from huggingface_hub import HfApi
api = HfApi()
upload_folder = True
if not upload_folder:

    api.upload_file(
        path_or_fileobj=state_path,
        path_in_repo="polymer_1M_weights.bin",
        repo_id="Defetya/simson_base",
        repo_type="model",
    )
else:

    api.upload_folder(
        folder_path="/home/jovyan/simson_training_bolgov",
        repo_id="Defetya/simson_base",
        path_in_repo="simson_modeling",
        repo_type="model",
    )