Anthonyg5005 commited on
Commit
fb5a000
1 Parent(s): c702e82

swap to sys exit

Browse files
Files changed (1) hide show
  1. HF Login Snippet.py +2 -1
HF Login Snippet.py CHANGED
@@ -1,6 +1,7 @@
1
  #import required functions
2
  from huggingface_hub import login, get_token, whoami
3
  import os
 
4
 
5
  #define clear screen function (OPTIONAL)
6
  oname = os.name
@@ -34,7 +35,7 @@ while True:
34
  Either set the environment variable to a (WRITE) token or remove it.
35
  ''')
36
  input("Press enter to continue.")
37
- exit()
38
  print("You do not have write access to this repository. Please use a valid token with (WRITE) access.")
39
  login(input("Enter your HuggingFace (WRITE) token: "))
40
  continue
 
1
  #import required functions
2
  from huggingface_hub import login, get_token, whoami
3
  import os
4
+ import sys
5
 
6
  #define clear screen function (OPTIONAL)
7
  oname = os.name
 
35
  Either set the environment variable to a (WRITE) token or remove it.
36
  ''')
37
  input("Press enter to continue.")
38
+ sys.exit("Exiting...")
39
  print("You do not have write access to this repository. Please use a valid token with (WRITE) access.")
40
  login(input("Enter your HuggingFace (WRITE) token: "))
41
  continue