Spaces:
Sleeping
Sleeping
first push
Browse files- src/streamlit_app.py +6 -1
src/streamlit_app.py
CHANGED
|
@@ -9,12 +9,17 @@ from sklearn.neighbors import KNeighborsClassifier
|
|
| 9 |
from sklearn.tree import DecisionTreeClassifier
|
| 10 |
from sklearn.metrics import accuracy_score, r2_score
|
| 11 |
|
| 12 |
-
# Define existing directories (must already be present in environment)
|
| 13 |
UPLOAD_DIR = "/uploads"
|
| 14 |
PROCESSED_DIR = "/processed"
|
| 15 |
PKL_DIR = "/pkl"
|
| 16 |
ENCODERS_DIR = "/encoders"
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
# Warn if directories don't exist
|
| 19 |
for folder in [UPLOAD_DIR, PROCESSED_DIR, PKL_DIR, ENCODERS_DIR]:
|
| 20 |
if not os.path.exists(folder):
|
|
|
|
| 9 |
from sklearn.tree import DecisionTreeClassifier
|
| 10 |
from sklearn.metrics import accuracy_score, r2_score
|
| 11 |
|
| 12 |
+
# Define existing directories (must already be present in environment, but we'll ensure creation)
|
| 13 |
UPLOAD_DIR = "/uploads"
|
| 14 |
PROCESSED_DIR = "/processed"
|
| 15 |
PKL_DIR = "/pkl"
|
| 16 |
ENCODERS_DIR = "/encoders"
|
| 17 |
|
| 18 |
+
# Create them if they don't exist
|
| 19 |
+
for folder in [UPLOAD_DIR, PROCESSED_DIR, PKL_DIR, ENCODERS_DIR]:
|
| 20 |
+
os.makedirs(folder, exist_ok=True)
|
| 21 |
+
|
| 22 |
+
|
| 23 |
# Warn if directories don't exist
|
| 24 |
for folder in [UPLOAD_DIR, PROCESSED_DIR, PKL_DIR, ENCODERS_DIR]:
|
| 25 |
if not os.path.exists(folder):
|