nandovallec commited on
Commit
f3e36b8
1 Parent(s): 0e5008e
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -26,6 +26,9 @@ from huggingface_hub import Repository
26
 
27
 
28
  HF_TOKEN = os.environ.get("HF_TOKEN")
 
 
 
29
  DATASET_REPO_URL_TRAIN = "https://huggingface.co/datasets/nandovallec/df_ps_train_extra"
30
  DATA_FILENAME_TRAIN = "df_ps_train_extra.hdf"
31
  DATA_FILE_TRAIN = os.path.join("data_train", DATA_FILENAME_TRAIN)
@@ -34,6 +37,13 @@ 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 get_repo_train():
38
  repo_train = Repository(
39
  local_dir="data_train", clone_from=DATASET_REPO_URL_TRAIN, use_auth_token=HF_TOKEN, repo_type="dataset"
@@ -59,8 +69,8 @@ def test(playlist_url, n_rec):
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()
 
26
 
27
 
28
  HF_TOKEN = os.environ.get("HF_TOKEN")
29
+
30
+ os.system('rm -rf .git/hooks')
31
+
32
  DATASET_REPO_URL_TRAIN = "https://huggingface.co/datasets/nandovallec/df_ps_train_extra"
33
  DATA_FILENAME_TRAIN = "df_ps_train_extra.hdf"
34
  DATA_FILE_TRAIN = os.path.join("data_train", DATA_FILENAME_TRAIN)
 
37
  DATA_FILENAME_MAT = "giantMatrix_extra.pickle"
38
  DATA_FILE_MAT = os.path.join("data_mat", DATA_FILENAME_MAT)
39
 
40
+ repo_train = Repository(
41
+ local_dir="data_train", clone_from=DATASET_REPO_URL_TRAIN, use_auth_token=HF_TOKEN, repo_type="dataset"
42
+ )
43
+ repo_mat = Repository(
44
+ local_dir="data_mat", clone_from=DATASET_REPO_URL_MAT, use_auth_token=HF_TOKEN, repo_type="dataset"
45
+ )
46
+
47
  def get_repo_train():
48
  repo_train = Repository(
49
  local_dir="data_train", clone_from=DATASET_REPO_URL_TRAIN, use_auth_token=HF_TOKEN, repo_type="dataset"
 
69
  # i += 1
70
  # if i % 5 == 0:
71
  # time.sleep(1)
72
+ #repo_train = get_repo_train()
73
+ #repo_mat = get_repo_mat()
74
  uri_links = inference_from_uri(list_uri, MAX_tid=n_rec)
75
  commit_url = repo_train.push_to_hub()
76
  commit_url = repo_mat.push_to_hub()