Shortheadband commited on
Commit
55f6574
·
verified ·
1 Parent(s): a807a3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -8,14 +8,16 @@ import gradio as gr
8
  # Load dataset
9
  df = pd.read_csv("expanded_test_score_dataset_filled.csv")
10
 
11
- # Features (all numeric columns except target)
 
 
 
12
  feature_cols = [
13
  "Weighted_GPA", "Term_GPA", "Class_Grade",
14
  "Field_Average_Percent", "Category_Weight", "Category_Average",
15
  "Study_Quality", "Study_Hours", "HW_Hour", "ECS", "Confidence",
16
  "Procrastination", "Participation", "Attendance",
17
  "Teacher_Experience", "Workday_Positivity", "Incentive", "Field_Proficiency"
18
- ]
19
 
20
  # Make sure columns are numeric
21
  for col in feature_cols:
 
8
  # Load dataset
9
  df = pd.read_csv("expanded_test_score_dataset_filled.csv")
10
 
11
+ # Normalize column names
12
+ df.columns = df.columns.str.strip().str.replace(" ", "_").str.replace("-", "_")
13
+
14
+ # Define features
15
  feature_cols = [
16
  "Weighted_GPA", "Term_GPA", "Class_Grade",
17
  "Field_Average_Percent", "Category_Weight", "Category_Average",
18
  "Study_Quality", "Study_Hours", "HW_Hour", "ECS", "Confidence",
19
  "Procrastination", "Participation", "Attendance",
20
  "Teacher_Experience", "Workday_Positivity", "Incentive", "Field_Proficiency"
 
21
 
22
  # Make sure columns are numeric
23
  for col in feature_cols: