multimodalart HF staff commited on
Commit
a3400ce
1 Parent(s): 0bb9dbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -337,13 +337,17 @@ def upload_civit_to_hf(profile: Optional[gr.OAuthProfile], oauth_token: gr.OAuth
337
  folder = str(uuid.uuid4())
338
  os.makedirs(folder, exist_ok=False)
339
  info, downloaded_files = process_url(url, profile, folder=folder)
340
- print("Civit URL: ", url)
341
- print("Downloaded files: ", downloaded_files)
342
  username = {profile.username}
343
  slug_name = slugify(info["name"])
344
  user_repo_id = f"{profile.username}/{slug_name}"
345
  create_readme(info, downloaded_files, user_repo_id, link_civit, folder=folder)
346
  try:
 
 
 
 
 
347
  print("Repo ID: ", user_repo_id)
348
  print("Current folder: ", folder)
349
  print(oauth_token.token)
 
337
  folder = str(uuid.uuid4())
338
  os.makedirs(folder, exist_ok=False)
339
  info, downloaded_files = process_url(url, profile, folder=folder)
340
+
 
341
  username = {profile.username}
342
  slug_name = slugify(info["name"])
343
  user_repo_id = f"{profile.username}/{slug_name}"
344
  create_readme(info, downloaded_files, user_repo_id, link_civit, folder=folder)
345
  try:
346
+ print("Civit URL: ", url)
347
+ print("Downloaded files: ", downloaded_files)
348
+ print("Files in folder")
349
+ files = [f for f in os.listdir(folder) if os.path.isfile(os.path.join(folder, f))]
350
+ print(files)
351
  print("Repo ID: ", user_repo_id)
352
  print("Current folder: ", folder)
353
  print(oauth_token.token)