Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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(
|