Update app.py
Browse files
app.py
CHANGED
@@ -70,21 +70,26 @@ def predict_performance(Location, College_Fee, GPA, Year, Course_Interested, Col
|
|
70 |
|
71 |
scaled_input = scaler.transform(df)
|
72 |
|
73 |
-
# Debug print 4: Show scaled input
|
74 |
-
print("\nScaled input:")
|
75 |
-
print(scaled_input)
|
76 |
|
77 |
-
prediction = model.predict(scaled_input)[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
-
#
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
print(f"Probability: {prediction_probability}")
|
84 |
-
prediction_percentage = prediction_probability * 100
|
85 |
-
print(f"Percentage: {prediction_percentage}")
|
86 |
|
87 |
-
return f"
|
88 |
|
89 |
iface = gr.Interface(
|
90 |
fn=predict_performance,
|
|
|
70 |
|
71 |
scaled_input = scaler.transform(df)
|
72 |
|
73 |
+
# # Debug print 4: Show scaled input
|
74 |
+
# print("\nScaled input:")
|
75 |
+
# print(scaled_input)
|
76 |
|
77 |
+
# prediction = model.predict(scaled_input)[0]
|
78 |
+
|
79 |
+
# # Debug print 5: Show prediction details
|
80 |
+
# print("\nPrediction details:")
|
81 |
+
# print(f"Raw prediction: {prediction}")
|
82 |
+
# prediction_probability = 1 / (1 + np.exp(-prediction))
|
83 |
+
# print(f"Probability: {prediction_probability}")
|
84 |
+
# prediction_percentage = prediction_probability * 100
|
85 |
+
# print(f"Percentage: {prediction_percentage}")
|
86 |
|
87 |
+
# return f"Chance of Admission: {prediction_percentage:.1f}%"
|
88 |
+
|
89 |
+
# Make predictions using the loaded model
|
90 |
+
prediction = model.predict(scaled_input)[0]
|
|
|
|
|
|
|
91 |
|
92 |
+
return f"Predicted House Price: ${prediction:,.2f}"
|
93 |
|
94 |
iface = gr.Interface(
|
95 |
fn=predict_performance,
|