nandovallec commited on
Commit
d24fe2b
1 Parent(s): 3da6e44
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -34,13 +34,15 @@ 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
- repo_train = Repository(
38
- local_dir="data_train", clone_from=DATASET_REPO_URL_TRAIN, use_auth_token=HF_TOKEN
39
- )
 
40
 
41
- repo_mat = Repository(
42
- local_dir="data_mat", clone_from=DATASET_REPO_URL_MAT, use_auth_token=HF_TOKEN
43
- )
 
44
 
45
  def test(playlist_url, n_rec):
46
  n_rec = int(n_rec)
@@ -57,6 +59,7 @@ def test(playlist_url, n_rec):
57
  # i += 1
58
  # if i % 5 == 0:
59
  # time.sleep(1)
 
60
  uri_links = inference_from_uri(list_uri, MAX_tid=n_rec)
61
  commit_url = repo_train.push_to_hub()
62
  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 rep1():
38
+ repo_train = Repository(
39
+ local_dir="data_train", clone_from=DATASET_REPO_URL_TRAIN, use_auth_token=HF_TOKEN
40
+ )
41
 
42
+ def rep2():
43
+ repo_mat = Repository(
44
+ local_dir="data_mat", clone_from=DATASET_REPO_URL_MAT, use_auth_token=HF_TOKEN
45
+ )
46
 
47
  def test(playlist_url, n_rec):
48
  n_rec = int(n_rec)
 
59
  # i += 1
60
  # if i % 5 == 0:
61
  # time.sleep(1)
62
+ rep_t = rep1()
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()