clefourrier HF staff gblazex commited on
Commit
ae618a2
1 Parent(s): f6d5857

store 'downloads' and 'created_at' fields as well (#534)

Browse files

- store 'downloads' and 'created_at' fields as well (5828e6b1fab376ebadfc27173d832754fee8948f)


Co-authored-by: Blaze <gblazex@users.noreply.huggingface.co>

src/scripts/update_all_request_files.py CHANGED
@@ -17,10 +17,14 @@ def update_models(file_path, models):
17
  if model_id not in models:
18
  data['still_on_hub'] = False
19
  data['likes'] = 0
 
 
20
  continue
21
 
22
  model_cfg = models[model_id]
23
  data['likes'] = model_cfg.likes
 
 
24
  #data['params'] = get_model_size(model_cfg, data['precision'])
25
  data['license'] = model_cfg.card_data.license if model_cfg.card_data is not None else ""
26
 
 
17
  if model_id not in models:
18
  data['still_on_hub'] = False
19
  data['likes'] = 0
20
+ data['downloads'] = 0
21
+ data['created_at'] = None
22
  continue
23
 
24
  model_cfg = models[model_id]
25
  data['likes'] = model_cfg.likes
26
+ data['downloads'] = model_cfg.downloads
27
+ data['created_at'] = model_cfg.created_at
28
  #data['params'] = get_model_size(model_cfg, data['precision'])
29
  data['license'] = model_cfg.card_data.license if model_cfg.card_data is not None else ""
30