Spaces:
Sleeping
Sleeping
Try to deploy on HF
Browse files
main.py
CHANGED
@@ -20,10 +20,10 @@ OAUTH_CLIENT_ID = os.environ.get('OAUTH_CLIENT_ID')
|
|
20 |
OAUTH_SCOPES = os.environ.get('OAUTH_SCOPES')
|
21 |
OAUTH_CLIENT_SECRET = os.environ.get('OAUTH_CLIENT_SECRET')
|
22 |
OPENID_PROVIDER_URL = os.environ.get('OPENID_PROVIDER_URL')
|
23 |
-
SPACE_HOST = os.environ.get('SPACE_HOST'
|
24 |
-
HF_DATASET_AUTH_TOKEN = os.environ.get('HF_DATASET_AUTH_TOKEN')
|
25 |
|
26 |
-
assert
|
27 |
|
28 |
LOCAL_STORAGE_PATH = ""
|
29 |
|
@@ -42,16 +42,16 @@ LOCAL_STORAGE_PATH.mkdir(exist_ok=True, parents=True)
|
|
42 |
EVENTS_FILE_PATH = LOCAL_STORAGE_PATH / FILE_EVENTS
|
43 |
|
44 |
|
45 |
-
scheduler = CommitScheduler(
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
)
|
55 |
|
56 |
|
57 |
|
|
|
20 |
OAUTH_SCOPES = os.environ.get('OAUTH_SCOPES')
|
21 |
OAUTH_CLIENT_SECRET = os.environ.get('OAUTH_CLIENT_SECRET')
|
22 |
OPENID_PROVIDER_URL = os.environ.get('OPENID_PROVIDER_URL')
|
23 |
+
SPACE_HOST = os.environ.get('SPACE_HOST')
|
24 |
+
HF_DATASET_AUTH_TOKEN = os.environ.get('HF_DATASET_AUTH_TOKEN', "none")
|
25 |
|
26 |
+
assert HF_DATASET_AUTH_TOKEN != "none", "Please set the corrent ENV variables!!!"
|
27 |
|
28 |
LOCAL_STORAGE_PATH = ""
|
29 |
|
|
|
42 |
EVENTS_FILE_PATH = LOCAL_STORAGE_PATH / FILE_EVENTS
|
43 |
|
44 |
|
45 |
+
# scheduler = CommitScheduler(
|
46 |
+
# repo_id="ml-visoft/c-reviewer",
|
47 |
+
# repo_type="dataset",
|
48 |
+
# folder_path=LOCAL_STORAGE_PATH,
|
49 |
+
# every=100,
|
50 |
+
# path_in_repo="raw_data",
|
51 |
+
# token=HF_DATASET_AUTH_TOKEN,
|
52 |
+
# allow_patterns=".jslines",
|
53 |
+
# squash_history=False
|
54 |
+
# )
|
55 |
|
56 |
|
57 |
|