Spaces:
Sleeping
Sleeping
Update train.py
Browse files
train.py
CHANGED
|
@@ -5,9 +5,8 @@ import pickle
|
|
| 5 |
import os
|
| 6 |
|
| 7 |
# Create output directory if it doesn't exist
|
| 8 |
-
if not os.path.exists('static'):
|
| 9 |
-
os.
|
| 10 |
-
|
| 11 |
# Generate synthetic dataset for mental health classification
|
| 12 |
# Features: age, mood (0-10), sleep (0-10), stress (0-10), anxiety (0-10)
|
| 13 |
# Label: has_issue (0 = no issue, 1 = potential issue)
|
|
|
|
| 5 |
import os
|
| 6 |
|
| 7 |
# Create output directory if it doesn't exist
|
| 8 |
+
if not os.path.exists('static/model.pkl'):
|
| 9 |
+
os.system('python train.py')
|
|
|
|
| 10 |
# Generate synthetic dataset for mental health classification
|
| 11 |
# Features: age, mood (0-10), sleep (0-10), stress (0-10), anxiety (0-10)
|
| 12 |
# Label: has_issue (0 = no issue, 1 = potential issue)
|