vpcom commited on
Commit
22a101f
·
1 Parent(s): 2392655

fix: print the info

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -11,10 +11,10 @@ REVISION = os.getenv("REVISION")
11
  TARGET = os.getenv("TARGET")
12
 
13
  def func(hf_token, repo, revision, target_repo):
14
- hf_token = hf_token if hf_token is None else HF_TOKEN
15
- repo = repo if repo is None else REPO
16
- revision = revision if revision is None else REVISION
17
- target_repo = target_repo if target_repo is None else TARGET
18
 
19
  print('download the desired model locally ...')
20
  hf_api.snapshot_download(
@@ -25,6 +25,8 @@ def func(hf_token, repo, revision, target_repo):
25
  )
26
  print(os.listdir(CURRENT_MODEL_PATH))
27
 
 
 
28
  for file in os.listdir(CURRENT_MODEL_PATH):
29
  print(f'uploading {file}')
30
  with open(f"{CURRENT_MODEL_PATH}/{file}", "rb") as fobj:
 
11
  TARGET = os.getenv("TARGET")
12
 
13
  def func(hf_token, repo, revision, target_repo):
14
+ hf_token = hf_token if hf_token else HF_TOKEN
15
+ repo = repo if repo else REPO
16
+ revision = revision if revision else REVISION
17
+ target_repo = target_repo if target_repo else TARGET
18
 
19
  print('download the desired model locally ...')
20
  hf_api.snapshot_download(
 
25
  )
26
  print(os.listdir(CURRENT_MODEL_PATH))
27
 
28
+ print(f"The content of {repo}/{revision} has been copied to {target_repo}!" )
29
+
30
  for file in os.listdir(CURRENT_MODEL_PATH):
31
  print(f'uploading {file}')
32
  with open(f"{CURRENT_MODEL_PATH}/{file}", "rb") as fobj: