gblazex commited on
Commit
5828e6b
1 Parent(s): 2227d54

store 'downloads' and 'created_at' fields as well

Browse files

It makes it very easy to calculate "trending" models based on this dataset.
Then people only need to grab model_info for the models they deem necessary.

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