Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,11 @@ description = "This model predicts the Premium Amount. Drag and drop any slice f
|
|
13 |
# Load configuration
|
14 |
with open("./config.json") as f:
|
15 |
config_dict = json.load(f)
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
|
18 |
# Load and prepare dataset
|
19 |
df = datasets.load_dataset("silvaKenpachi/mental_health")["train"].to_pandas()
|
|
|
13 |
# Load configuration
|
14 |
with open("./config.json") as f:
|
15 |
config_dict = json.load(f)
|
16 |
+
all_headers = config_dict["sklearn"]["columns"]
|
17 |
+
|
18 |
+
# Filter headers to only include those present in the dataset
|
19 |
+
headers = [col for col in all_headers if col in df.columns]
|
20 |
+
|
21 |
|
22 |
# Load and prepare dataset
|
23 |
df = datasets.load_dataset("silvaKenpachi/mental_health")["train"].to_pandas()
|