Skip to content

Commit

Permalink
Fix the OAuth check logic (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
apolinario authored Dec 15, 2023
1 parent 4d45439 commit f914cda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/autotrain/trainers/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f914cda

Please sign in to comment.