Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
import joblib
|
3 |
import numpy as np
|
4 |
import pandas as pd
|
@@ -33,10 +33,10 @@ def encode_categorical_columns(df):
|
|
33 |
def predict_performance(Location, Course, College, Faculty, Source, Event, Presenter, Visited_Parent, Visited_College_for_Inquiry, Attended_Any_Event, College_Fee, GPA, Year):
|
34 |
input_data = [Location, Course, College, Faculty, Source, Event, Presenter, Visited_Parent, Visited_College_for_Inquiry, Attended_Any_Event, College_Fee, GPA, Year]
|
35 |
|
36 |
-
# Updated feature names to use
|
37 |
feature_names = [
|
38 |
"Location", "Course", "College", "Faculty", "Source", "Event", "Presenter",
|
39 |
-
"
|
40 |
]
|
41 |
|
42 |
input_df = pd.DataFrame([input_data], columns=feature_names)
|
|
|
1 |
+
mport gradio as gr
|
2 |
import joblib
|
3 |
import numpy as np
|
4 |
import pandas as pd
|
|
|
33 |
def predict_performance(Location, Course, College, Faculty, Source, Event, Presenter, Visited_Parent, Visited_College_for_Inquiry, Attended_Any_Event, College_Fee, GPA, Year):
|
34 |
input_data = [Location, Course, College, Faculty, Source, Event, Presenter, Visited_Parent, Visited_College_for_Inquiry, Attended_Any_Event, College_Fee, GPA, Year]
|
35 |
|
36 |
+
# Updated feature names to use spaces instead of underscores to match training data
|
37 |
feature_names = [
|
38 |
"Location", "Course", "College", "Faculty", "Source", "Event", "Presenter",
|
39 |
+
"Visited Parent", "Visited College for Inquiry", "Attended Any Event", "College Fee", "GPA", "Year"
|
40 |
]
|
41 |
|
42 |
input_df = pd.DataFrame([input_data], columns=feature_names)
|