Update app.py
Browse files
app.py
CHANGED
|
@@ -189,13 +189,14 @@ def certification(hf_username):
|
|
| 189 |
best_result, best_model_id = calculate_best_result(user_asr_models, task = "automatic-speech-recognition")
|
| 190 |
unit["best_result"] = best_result
|
| 191 |
unit["best_model_id"] = best_model_id
|
| 192 |
-
if unit["best_result"] <= unit["baseline_metric"]:
|
| 193 |
unit["passed_"] = True
|
| 194 |
unit["passed"] = pass_emoji(unit["passed_"])
|
| 195 |
except: print("Either no relevant models found, or no metrics in the model card for automatic speech recognition")
|
| 196 |
case "text-to-speech":
|
| 197 |
try:
|
| 198 |
user_tts_models = get_user_models(hf_username, task = "text-to-speech")
|
|
|
|
| 199 |
if user_tts_models:
|
| 200 |
unit["best_result"] = 0
|
| 201 |
unit["best_model_id"] = user_tts_models[0]
|
|
|
|
| 189 |
best_result, best_model_id = calculate_best_result(user_asr_models, task = "automatic-speech-recognition")
|
| 190 |
unit["best_result"] = best_result
|
| 191 |
unit["best_model_id"] = best_model_id
|
| 192 |
+
if unit["best_result"] / 100 <= unit["baseline_metric"]:
|
| 193 |
unit["passed_"] = True
|
| 194 |
unit["passed"] = pass_emoji(unit["passed_"])
|
| 195 |
except: print("Either no relevant models found, or no metrics in the model card for automatic speech recognition")
|
| 196 |
case "text-to-speech":
|
| 197 |
try:
|
| 198 |
user_tts_models = get_user_models(hf_username, task = "text-to-speech")
|
| 199 |
+
print(f"\nTTS {user_tts_models}\n")
|
| 200 |
if user_tts_models:
|
| 201 |
unit["best_result"] = 0
|
| 202 |
unit["best_model_id"] = user_tts_models[0]
|