fffiloni commited on
Commit
8f30316
1 Parent(s): 62b04c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -58,6 +58,10 @@ def main(dataset_url):
58
  repo_parts = dataset_repo.split("/")
59
  local_dir = f"./{repo_parts[-1]}" # Use the last part of the split
60
 
 
 
 
 
61
  gr.Info("Downloading dataset ...")
62
 
63
  snapshot_download(
 
58
  repo_parts = dataset_repo.split("/")
59
  local_dir = f"./{repo_parts[-1]}" # Use the last part of the split
60
 
61
+ # Check if the directory exists and create it if necessary
62
+ if not os.path.exists(local_dir):
63
+ os.makedirs(local_dir)
64
+
65
  gr.Info("Downloading dataset ...")
66
 
67
  snapshot_download(