Hemg commited on
Commit
c633373
·
verified ·
1 Parent(s): 4b67b97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -30,9 +30,9 @@ def encode_categorical_columns(df):
30
  df = pd.get_dummies(df, columns=nominal_columns, drop_first=True)
31
 
32
  return df
33
- def predict_performance(Location, Course,Faculty, College,Source, Event, Presenter, Visited_Parent,
34
  Visited_College_for_Inquiry, Attended_Any_Event, College_Fee, GPA, Year):
35
- input_data = [Location, Course, Faculty, Source, Event, Presenter, Visited_Parent,
36
  Visited_College_for_Inquiry, Attended_Any_Event, College_Fee, GPA, Year]
37
 
38
  # Updated feature names to use spaces instead of underscores to match training data
@@ -85,6 +85,7 @@ iface = gr.Interface(
85
  "BA (Hons) Accounting & Finance",
86
  "BA (Hons) Business Administration"], label="Course"),
87
  gr.Radio(["Science", "Management", "Humanities"], label="Faculty"),
 
88
  gr.Radio(["Event", "Facebook", "Instagram", "Offline", "Recommendation"], label="Source"),
89
  gr.Radio(["New Year", "Dashain", "Orientation", "Fresher's Party",
90
  "Holi Festival", "Welcome Ceremony"], label="Event"),
@@ -93,10 +94,10 @@ iface = gr.Interface(
93
  gr.Radio(["Yes", "No"], label="Visited Parent"),
94
  gr.Radio(["Trinity", "CCRC", "KMC", "SOS", "ISMT", "St. Xavier's", "Everest", "Prime"], label="College"),
95
  gr.Radio(["Yes", "No"], label="Visited College for Inquiry"),
96
- gr.Radio(["New Year", "Dashain", "Orientation", "Fresher's Party", "Holi Festival", "Welcome Ceremony"],
97
- label="Event"),
98
  gr.Radio(["Yes", "No"], label="Attended Any Event"),
99
- gr.Radio(["Yes", "No"], label="Visited Parent")
 
 
100
  ],
101
  outputs="text",
102
  title="Chance of Student Admission",
 
30
  df = pd.get_dummies(df, columns=nominal_columns, drop_first=True)
31
 
32
  return df
33
+ def predict_performance(Location, Course, Faculty, College, Source, Event, Presenter, Visited_Parent,
34
  Visited_College_for_Inquiry, Attended_Any_Event, College_Fee, GPA, Year):
35
+ input_data = [Location, Course, Faculty, College, Source, Event, Presenter, Visited_Parent,
36
  Visited_College_for_Inquiry, Attended_Any_Event, College_Fee, GPA, Year]
37
 
38
  # Updated feature names to use spaces instead of underscores to match training data
 
85
  "BA (Hons) Accounting & Finance",
86
  "BA (Hons) Business Administration"], label="Course"),
87
  gr.Radio(["Science", "Management", "Humanities"], label="Faculty"),
88
+ gr.Radio(["Trinity", "CCRC", "KMC", "SOS", "ISMT", "St. Xavier's", "Everest", "Prime"], label="College"),
89
  gr.Radio(["Event", "Facebook", "Instagram", "Offline", "Recommendation"], label="Source"),
90
  gr.Radio(["New Year", "Dashain", "Orientation", "Fresher's Party",
91
  "Holi Festival", "Welcome Ceremony"], label="Event"),
 
94
  gr.Radio(["Yes", "No"], label="Visited Parent"),
95
  gr.Radio(["Trinity", "CCRC", "KMC", "SOS", "ISMT", "St. Xavier's", "Everest", "Prime"], label="College"),
96
  gr.Radio(["Yes", "No"], label="Visited College for Inquiry"),
 
 
97
  gr.Radio(["Yes", "No"], label="Attended Any Event"),
98
+ gr.Number(label="College Fee"),
99
+ gr.Number(label="GPA"),
100
+ gr.Number(label="Year")
101
  ],
102
  outputs="text",
103
  title="Chance of Student Admission",