Spaces:
Runtime error
Runtime error
Fix run time error for Check my progress Audio (app.py)
#5
by
thuyentruong
- opened
app.py
CHANGED
@@ -203,13 +203,15 @@ def certification(hf_username):
|
|
203 |
unit["passed"] = pass_emoji(unit["passed_"])
|
204 |
except: print("Either no relevant models found, or no metrics in the model card for automatic speech recognition")
|
205 |
case "demo":
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
|
|
|
|
213 |
case _:
|
214 |
print("Unknown task")
|
215 |
|
|
|
203 |
unit["passed"] = pass_emoji(unit["passed_"])
|
204 |
except: print("Either no relevant models found, or no metrics in the model card for automatic speech recognition")
|
205 |
case "demo":
|
206 |
+
try:
|
207 |
+
u7_usernames = hf_hub_download(USERNAMES_DATASET_ID, repo_type = "dataset", filename="usernames.csv", token=HF_TOKEN)
|
208 |
+
u7_users = pd.read_csv(u7_usernames)
|
209 |
+
if hf_username in u7_users['username'].tolist():
|
210 |
+
unit["best_result"] = 0
|
211 |
+
unit["best_model_id"] = "Demo check passed, no model id"
|
212 |
+
unit["passed_"] = True
|
213 |
+
unit["passed"] = pass_emoji(unit["passed_"])
|
214 |
+
except: print("Either no relevant models found, or no metrics in the model card for demo")
|
215 |
case _:
|
216 |
print("Unknown task")
|
217 |
|