Hemg commited on
Commit
27e44c8
·
verified ·
1 Parent(s): 815574c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -85,31 +85,35 @@ def predict_performance(Location, Course, College, Faculty, Source, Event, Prese
85
 
86
  return f"Chance of Admission: {prediction:.1f}"
87
 
 
88
  # Create Gradio interface
89
  iface = gr.Interface(
90
  fn=predict_performance,
91
  inputs=[
92
  gr.Radio(["Kathmandu", "Bhaktapur", "Lalitpur", "Kritipur"], label="Location"),
93
- gr.Slider(minimum=1000000, maximum=1700000, label="College Fee"),
94
- gr.Slider(minimum=2, maximum=3, label="GPA"), # Fixed GPA input
95
- gr.Slider(minimum=2019, maximum=2025, step=1, label="Year"),
96
  gr.Radio(["MSc IT & Applied Security", "BSc (Hons) Computing", "BSc (Hons) Computing with Artificial Intelligence",
97
  "BSc (Hons) Computer Networking & IT Security", "BSc (Hons) Multimedia Technologies", "MBA",
98
  "BA (Hons) Accounting & Finance", "BA (Hons) Business Administration"], label="Course"),
 
99
  gr.Radio(["Science", "Management", "Humanities"], label="Faculty"),
100
  gr.Radio(["Event", "Facebook", "Instagram", "Offline", "Recommendation"], label="Source"),
101
- gr.Radio(["Yes", "No"], label="Visited College for Inquiry"),
102
  gr.Radio(["New Year", "Dashain", "Orientation", "Fresher's Party", "Holi Festival", "Welcome Ceremony"],
103
  label="Event"),
104
- gr.Radio(["Yes", "No"], label="Attended Any Event"),
105
  gr.Radio(["Ram", "Gita", "Manish", "Shyam", "Raj", "Hari", "Rina", "Shree"], label="Presenter"),
106
- gr.Radio(["Yes", "No"], label="Visited Parent")
 
 
 
 
 
107
  ],
108
  outputs="text",
109
  title="Chance of Student Admission",
110
  description="Predict the chances of a student's admission based on various inputs."
111
  )
112
 
 
 
113
  # Run the app
114
  if __name__ == "__main__":
115
  iface.launch(share=True)
 
85
 
86
  return f"Chance of Admission: {prediction:.1f}"
87
 
88
+ # Create Gradio interface
89
  # Create Gradio interface
90
  iface = gr.Interface(
91
  fn=predict_performance,
92
  inputs=[
93
  gr.Radio(["Kathmandu", "Bhaktapur", "Lalitpur", "Kritipur"], label="Location"),
 
 
 
94
  gr.Radio(["MSc IT & Applied Security", "BSc (Hons) Computing", "BSc (Hons) Computing with Artificial Intelligence",
95
  "BSc (Hons) Computer Networking & IT Security", "BSc (Hons) Multimedia Technologies", "MBA",
96
  "BA (Hons) Accounting & Finance", "BA (Hons) Business Administration"], label="Course"),
97
+ gr.Radio(["Yes", "No"], label="College"), # Add appropriate options for College
98
  gr.Radio(["Science", "Management", "Humanities"], label="Faculty"),
99
  gr.Radio(["Event", "Facebook", "Instagram", "Offline", "Recommendation"], label="Source"),
 
100
  gr.Radio(["New Year", "Dashain", "Orientation", "Fresher's Party", "Holi Festival", "Welcome Ceremony"],
101
  label="Event"),
 
102
  gr.Radio(["Ram", "Gita", "Manish", "Shyam", "Raj", "Hari", "Rina", "Shree"], label="Presenter"),
103
+ gr.Radio(["Yes", "No"], label="Visited Parent"),
104
+ gr.Radio(["Yes", "No"], label="Visited College for Inquiry"),
105
+ gr.Radio(["Yes", "No"], label="Attended Any Event"),
106
+ gr.Slider(minimum=1000000, maximum=1700000, step=1000, label="College Fee"),
107
+ gr.Slider(minimum=2.0, maximum=3.0, step=0.1, label="GPA"),
108
+ gr.Slider(minimum=2019, maximum=2025, step=1, label="Year")
109
  ],
110
  outputs="text",
111
  title="Chance of Student Admission",
112
  description="Predict the chances of a student's admission based on various inputs."
113
  )
114
 
115
+
116
+
117
  # Run the app
118
  if __name__ == "__main__":
119
  iface.launch(share=True)