radames commited on
Commit
24ca8de
1 Parent(s): e082b4b

parse model meta for new models

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -186,6 +186,7 @@ async def sync_data():
186
  likes = model['likes']
187
  downloads = model['downloads']
188
  model_card = fetch_model_card(model_id)
 
189
  images = await find_image_in_model_card(model_card)
190
 
191
  classifier = run_classifier(images)
@@ -197,6 +198,7 @@ async def sync_data():
197
  [model_id,
198
  json.dumps({
199
  **model,
 
200
  "images": images,
201
  "class": classifier
202
  }),
 
186
  likes = model['likes']
187
  downloads = model['downloads']
188
  model_card = fetch_model_card(model_id)
189
+ model_card_data = get_yaml_data(model_card)
190
  images = await find_image_in_model_card(model_card)
191
 
192
  classifier = run_classifier(images)
 
198
  [model_id,
199
  json.dumps({
200
  **model,
201
+ "meta": model_card_data,
202
  "images": images,
203
  "class": classifier
204
  }),