Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,11 @@ KNN_Regressor = load('knn_lab4.joblib')
|
|
10 |
## Building a Fubction for prediction:
|
11 |
|
12 |
def predictPrice(input1, input2, input3, input4, input5, input6, input7, input8):
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
19 |
|
20 |
|
|
|
10 |
## Building a Fubction for prediction:
|
11 |
|
12 |
def predictPrice(input1, input2, input3, input4, input5, input6, input7, input8):
|
13 |
+
features = np.array([[input1, input2, input3, input4, input5, input6, input7, input8]])
|
14 |
+
features_scaled = scaler.transform(features)
|
15 |
+
prediction = KNN_Regressor.predict(features_scaled)
|
16 |
+
return prediction
|
17 |
+
|
18 |
|
19 |
|
20 |
|