Spaces:
Runtime error
Runtime error
fix added
Browse files
app.py
CHANGED
|
@@ -20,6 +20,15 @@ url = "https://huggingface.co/datasets/ananyakarn/DAIC_WOZ_Data/resolve/main/DAI
|
|
| 20 |
zip_path = "data.zip"
|
| 21 |
extract_path = "DAIC_WOZ"
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
if not os.path.exists(extract_path):
|
| 24 |
print("Downloading dataset...")
|
| 25 |
r = requests.get(url, stream=True)
|
|
|
|
| 20 |
zip_path = "data.zip"
|
| 21 |
extract_path = "DAIC_WOZ"
|
| 22 |
|
| 23 |
+
|
| 24 |
+
# 🔥 FIX: handle nested folder
|
| 25 |
+
while len(os.listdir(extract_path)) == 1:
|
| 26 |
+
extract_path = os.path.join(extract_path, os.listdir(extract_path)[0])
|
| 27 |
+
|
| 28 |
+
print("Final dataset path:", extract_path)
|
| 29 |
+
|
| 30 |
+
print("Folders detected:", os.listdir(extract_path)[:10])
|
| 31 |
+
|
| 32 |
if not os.path.exists(extract_path):
|
| 33 |
print("Downloading dataset...")
|
| 34 |
r = requests.get(url, stream=True)
|