davanstrien HF Staff commited on
Commit
31639f7
·
1 Parent(s): 2519c50
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -274,12 +274,14 @@ def _basic_check(hub_id):
274
  score_summary = (
275
  f"Your model's metadata score is {round(score*100)}% based on suggested metadata for {task}"
276
  )
277
- recommendations = (
278
- "Here are some suggestions to improve your model's metadata for"
279
- f" {task}."
280
- )
281
- for v in to_fix.values():
282
- recommendations += f"\n- {v}"
 
 
283
  return score_summary + recommendations if recommendations else score_summary
284
  except Exception as e:
285
  print(e)
 
274
  score_summary = (
275
  f"Your model's metadata score is {round(score*100)}% based on suggested metadata for {task}"
276
  )
277
+ recommendations = None
278
+ if to_fix:
279
+ recommendations = (
280
+ "Here are some suggestions to improve your model's metadata for"
281
+ f" {task}."
282
+ )
283
+ for v in to_fix.values():
284
+ recommendations += f"\n- {v}"
285
  return score_summary + recommendations if recommendations else score_summary
286
  except Exception as e:
287
  print(e)