From f914cda30b938fb1a727e91fa51f2203eb102680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?apolin=C3=A1rio?= Date: Fri, 15 Dec 2023 10:01:04 -0600 Subject: [PATCH] Fix the OAuth check logic (#398) --- src/autotrain/trainers/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/autotrain/trainers/common.py b/src/autotrain/trainers/common.py index d01a465c88..528c99b6c8 100644 --- a/src/autotrain/trainers/common.py +++ b/src/autotrain/trainers/common.py @@ -51,7 +51,7 @@ def pause_space(params, is_failure=False): msg = f"Your training run was successful! [Check out your trained model here](https://huggingface.co/{params.repo_id})" title = "Your training has finished successfully ✅" - if params.token.startswith("hf_"): + if not params.token.startswith("hf_oauth_"): api.create_discussion( repo_id=os.environ["SPACE_ID"], title=title,