silvaKenpachi commited on
Commit
9e4102b
·
verified ·
1 Parent(s): 12c727d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
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
- headers = config_dict["sklearn"]["columns"]
 
 
 
 
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()