Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ import pickle
|
|
| 7 |
with open("apartment_price_model.pkl", mode="rb") as f:
|
| 8 |
model = pickle.load(f)
|
| 9 |
|
| 10 |
-
def predict_price(
|
| 11 |
# Default values for other features
|
| 12 |
pop = 420217
|
| 13 |
pop_dens = 4778
|
|
@@ -70,7 +70,7 @@ with gr.Blocks() as demo:
|
|
| 70 |
|
| 71 |
submit_button.click(
|
| 72 |
fn=predict_price,
|
| 73 |
-
inputs=[
|
| 74 |
outputs=output
|
| 75 |
)
|
| 76 |
|
|
|
|
| 7 |
with open("apartment_price_model.pkl", mode="rb") as f:
|
| 8 |
model = pickle.load(f)
|
| 9 |
|
| 10 |
+
def predict_price(rooms, area, has_balcony, is_renovated):
|
| 11 |
# Default values for other features
|
| 12 |
pop = 420217
|
| 13 |
pop_dens = 4778
|
|
|
|
| 70 |
|
| 71 |
submit_button.click(
|
| 72 |
fn=predict_price,
|
| 73 |
+
inputs=[rooms, area, has_balcony, is_renovated],
|
| 74 |
outputs=output
|
| 75 |
)
|
| 76 |
|