Hemg commited on
Commit
e9df9b2
·
verified ·
1 Parent(s): 881c642

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -62,15 +62,13 @@ def predict_performance(Location, Course, College, Faculty, Source, Event, Prese
62
  # Clip the prediction to be between 0 and 1
63
  prediction = np.clip(prediction, 0, 1)
64
 
65
- # Convert to percentage
66
- prediction_percentage = prediction * 100
67
 
68
  # Debug print
69
  print("\nPrediction details:")
70
  print(f"Raw prediction: {prediction}")
71
- print(f"Percentage: {prediction_percentage}")
72
 
73
- return f"Chance of Admission: {prediction_percentage:.1f}%"
74
 
75
  # Create Gradio interface
76
  iface = gr.Interface(
@@ -78,7 +76,7 @@ iface = gr.Interface(
78
  inputs=[
79
  gr.Radio(["Kathmandu", "Bhaktapur", "Lalitpur", "Kritipur"], label="Location"),
80
  gr.Slider(minimum=1000000, maximum=1700000, label="College Fee"),
81
- gr.Slider(minimum=1, maximum=3, label="GPA"), # Fixed GPA input
82
  gr.Slider(minimum=2019, maximum=2025, step=1, label="Year"),
83
  gr.Radio(["MSc IT & Applied Security", "BSc (Hons) Computing", "BSc (Hons) Computing with Artificial Intelligence",
84
  "BSc (Hons) Computer Networking & IT Security", "BSc (Hons) Multimedia Technologies", "MBA",
 
62
  # Clip the prediction to be between 0 and 1
63
  prediction = np.clip(prediction, 0, 1)
64
 
 
 
65
 
66
  # Debug print
67
  print("\nPrediction details:")
68
  print(f"Raw prediction: {prediction}")
69
+
70
 
71
+ return f"Chance of Admission: {prediction:.1f}"
72
 
73
  # Create Gradio interface
74
  iface = gr.Interface(
 
76
  inputs=[
77
  gr.Radio(["Kathmandu", "Bhaktapur", "Lalitpur", "Kritipur"], label="Location"),
78
  gr.Slider(minimum=1000000, maximum=1700000, label="College Fee"),
79
+ gr.Slider(minimum=2, maximum=3, label="GPA"), # Fixed GPA input
80
  gr.Slider(minimum=2019, maximum=2025, step=1, label="Year"),
81
  gr.Radio(["MSc IT & Applied Security", "BSc (Hons) Computing", "BSc (Hons) Computing with Artificial Intelligence",
82
  "BSc (Hons) Computer Networking & IT Security", "BSc (Hons) Multimedia Technologies", "MBA",