Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def predict_price(size, bedrooms, age):
|
|
23 |
prediction = model.predict(input_data)
|
24 |
return prediction[0]
|
25 |
|
26 |
-
# Define the Gradio interface
|
27 |
iface = gr.Interface(
|
28 |
fn=predict_price,
|
29 |
inputs=[
|
@@ -33,12 +33,11 @@ iface = gr.Interface(
|
|
33 |
],
|
34 |
outputs=gr.Number(label="Predicted Price ($)"),
|
35 |
title="House Price Prediction",
|
36 |
-
description="Enter the size, number of bedrooms, and age of the house to get the predicted price."
|
37 |
-
# Enable API mode for the Space
|
38 |
-
api_open=True
|
39 |
)
|
40 |
|
41 |
# Launch the interface
|
42 |
if __name__ == "__main__":
|
43 |
iface.launch()
|
44 |
|
|
|
|
23 |
prediction = model.predict(input_data)
|
24 |
return prediction[0]
|
25 |
|
26 |
+
# Define the Gradio interface (remove api_open parameter)
|
27 |
iface = gr.Interface(
|
28 |
fn=predict_price,
|
29 |
inputs=[
|
|
|
33 |
],
|
34 |
outputs=gr.Number(label="Predicted Price ($)"),
|
35 |
title="House Price Prediction",
|
36 |
+
description="Enter the size, number of bedrooms, and age of the house to get the predicted price."
|
|
|
|
|
37 |
)
|
38 |
|
39 |
# Launch the interface
|
40 |
if __name__ == "__main__":
|
41 |
iface.launch()
|
42 |
|
43 |
+
|