Spaces:
Runtime error
Runtime error
Commit
·
4159b15
1
Parent(s):
c9bf28d
app
Browse files
app.py
CHANGED
@@ -272,8 +272,7 @@ def _basic_check(hub_id):
|
|
272 |
max_score = task_scores["_max_score"]
|
273 |
score = score / max_score
|
274 |
score_summary = (
|
275 |
-
f"Your model's metadata score is {round(score*100)}% based on suggested"
|
276 |
-
f" metadata for {task}"
|
277 |
)
|
278 |
recommendations = (
|
279 |
"Here are some suggestions to improve your model's metadata for"
|
@@ -281,7 +280,10 @@ def _basic_check(hub_id):
|
|
281 |
)
|
282 |
for v in to_fix.values():
|
283 |
recommendations += f"\n- {v}"
|
284 |
-
|
|
|
|
|
|
|
285 |
except Exception as e:
|
286 |
print(e)
|
287 |
return None
|
|
|
272 |
max_score = task_scores["_max_score"]
|
273 |
score = score / max_score
|
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"
|
|
|
280 |
)
|
281 |
for v in to_fix.values():
|
282 |
recommendations += f"\n- {v}"
|
283 |
+
if recommendations:
|
284 |
+
return score + recommendations
|
285 |
+
else:
|
286 |
+
return score
|
287 |
except Exception as e:
|
288 |
print(e)
|
289 |
return None
|