Anthonyg5005
commited on
Commit
•
836267e
1
Parent(s):
fa0da4d
small fixes
Browse files- HF Login Snippet Kaggle.py +2 -2
- README.md +1 -1
- manage branches.py +3 -2
- requirements.txt +0 -3
- upload folder to repo.py +2 -2
HF Login Snippet Kaggle.py
CHANGED
@@ -5,8 +5,8 @@ from huggingface_hub import login, get_token, whoami
|
|
5 |
|
6 |
#get token
|
7 |
if os.environ.get('KAGGLE_KERNEL_RUN_TYPE', None) is not None: #check if user in kaggle
|
8 |
-
from kaggle_secrets import UserSecretsClient
|
9 |
-
from kaggle_web_client import BackendError
|
10 |
try:
|
11 |
login(UserSecretsClient().get_secret("HF_TOKEN")) #login if token secret found
|
12 |
except BackendError:
|
|
|
5 |
|
6 |
#get token
|
7 |
if os.environ.get('KAGGLE_KERNEL_RUN_TYPE', None) is not None: #check if user in kaggle
|
8 |
+
from kaggle_secrets import UserSecretsClient # type: ignore
|
9 |
+
from kaggle_web_client import BackendError # type: ignore
|
10 |
try:
|
11 |
login(UserSecretsClient().get_secret("HF_TOKEN")) #login if token secret found
|
12 |
except BackendError:
|
README.md
CHANGED
@@ -40,7 +40,7 @@ Feel free to send in PRs or use this code however you'd like.\
|
|
40 |
|
41 |
- EXL2 Private Quant
|
42 |
- Allows you to quantize to exl2 using colab. This version creates a exl2 quant to upload to private repo. Should work on any Linux jupyterlab server with CUDA, ROCM should be supported by exl2 but not tested.
|
43 |
-
|
44 |
- Upload folder to repo
|
45 |
- Uploads user specified folder to specified repo, can create private repos too. Not the same as git commit and push, instead uploads any additional files.
|
46 |
|
|
|
40 |
|
41 |
- EXL2 Private Quant
|
42 |
- Allows you to quantize to exl2 using colab. This version creates a exl2 quant to upload to private repo. Should work on any Linux jupyterlab server with CUDA, ROCM should be supported by exl2 but not tested.
|
43 |
+
|
44 |
- Upload folder to repo
|
45 |
- Uploads user specified folder to specified repo, can create private repos too. Not the same as git commit and push, instead uploads any additional files.
|
46 |
|
manage branches.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
#import required modules
|
2 |
import os
|
|
|
3 |
from huggingface_hub import create_branch, delete_branch, login, get_token, whoami
|
4 |
|
5 |
#define clear screen function
|
@@ -62,8 +63,8 @@ clear_screen()
|
|
62 |
|
63 |
#get token
|
64 |
if os.environ.get('KAGGLE_KERNEL_RUN_TYPE', None) is not None: #check if user in kaggle
|
65 |
-
from kaggle_secrets import UserSecretsClient
|
66 |
-
from kaggle_web_client import BackendError
|
67 |
try:
|
68 |
login(UserSecretsClient().get_secret("HF_TOKEN")) #login if token secret found
|
69 |
except BackendError:
|
|
|
1 |
#import required modules
|
2 |
import os
|
3 |
+
import sys
|
4 |
from huggingface_hub import create_branch, delete_branch, login, get_token, whoami
|
5 |
|
6 |
#define clear screen function
|
|
|
63 |
|
64 |
#get token
|
65 |
if os.environ.get('KAGGLE_KERNEL_RUN_TYPE', None) is not None: #check if user in kaggle
|
66 |
+
from kaggle_secrets import UserSecretsClient # type: ignore
|
67 |
+
from kaggle_web_client import BackendError # type: ignore
|
68 |
try:
|
69 |
login(UserSecretsClient().get_secret("HF_TOKEN")) #login if token secret found
|
70 |
except BackendError:
|
requirements.txt
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
huggingface-hub>=0.20.0
|
2 |
-
requests
|
3 |
-
tqdm
|
|
|
|
|
|
|
|
upload folder to repo.py
CHANGED
@@ -18,8 +18,8 @@ clear_screen()
|
|
18 |
|
19 |
#get token
|
20 |
if os.environ.get('KAGGLE_KERNEL_RUN_TYPE', None) is not None: #check if user in kaggle
|
21 |
-
from kaggle_secrets import UserSecretsClient
|
22 |
-
from kaggle_web_client import BackendError
|
23 |
try:
|
24 |
login(UserSecretsClient().get_secret("HF_TOKEN")) #login if token secret found
|
25 |
except BackendError:
|
|
|
18 |
|
19 |
#get token
|
20 |
if os.environ.get('KAGGLE_KERNEL_RUN_TYPE', None) is not None: #check if user in kaggle
|
21 |
+
from kaggle_secrets import UserSecretsClient # type: ignore
|
22 |
+
from kaggle_web_client import BackendError # type: ignore
|
23 |
try:
|
24 |
login(UserSecretsClient().get_secret("HF_TOKEN")) #login if token secret found
|
25 |
except BackendError:
|