Spaces:
Runtime error
Runtime error
nandovallec
commited on
Commit
•
9d7b9e6
1
Parent(s):
d24fe2b
Fix
Browse files
app.py
CHANGED
@@ -34,12 +34,12 @@ DATASET_REPO_URL_MAT = "https://huggingface.co/datasets/nandovallec/giantMatrix_
|
|
34 |
DATA_FILENAME_MAT = "giantMatrix_extra.pickle"
|
35 |
DATA_FILE_MAT = os.path.join("data_mat", DATA_FILENAME_MAT)
|
36 |
|
37 |
-
def
|
38 |
repo_train = Repository(
|
39 |
local_dir="data_train", clone_from=DATASET_REPO_URL_TRAIN, use_auth_token=HF_TOKEN
|
40 |
)
|
41 |
|
42 |
-
def
|
43 |
repo_mat = Repository(
|
44 |
local_dir="data_mat", clone_from=DATASET_REPO_URL_MAT, use_auth_token=HF_TOKEN
|
45 |
)
|
@@ -59,7 +59,8 @@ def test(playlist_url, n_rec):
|
|
59 |
# i += 1
|
60 |
# if i % 5 == 0:
|
61 |
# time.sleep(1)
|
62 |
-
|
|
|
63 |
uri_links = inference_from_uri(list_uri, MAX_tid=n_rec)
|
64 |
commit_url = repo_train.push_to_hub()
|
65 |
commit_url = repo_mat.push_to_hub()
|
|
|
34 |
DATA_FILENAME_MAT = "giantMatrix_extra.pickle"
|
35 |
DATA_FILE_MAT = os.path.join("data_mat", DATA_FILENAME_MAT)
|
36 |
|
37 |
+
def get_repo_train():
|
38 |
repo_train = Repository(
|
39 |
local_dir="data_train", clone_from=DATASET_REPO_URL_TRAIN, use_auth_token=HF_TOKEN
|
40 |
)
|
41 |
|
42 |
+
def get_repo_mat():
|
43 |
repo_mat = Repository(
|
44 |
local_dir="data_mat", clone_from=DATASET_REPO_URL_MAT, use_auth_token=HF_TOKEN
|
45 |
)
|
|
|
59 |
# i += 1
|
60 |
# if i % 5 == 0:
|
61 |
# time.sleep(1)
|
62 |
+
repo_train = get_repo_train()
|
63 |
+
repo_mat = get_repo_mat()
|
64 |
uri_links = inference_from_uri(list_uri, MAX_tid=n_rec)
|
65 |
commit_url = repo_train.push_to_hub()
|
66 |
commit_url = repo_mat.push_to_hub()
|