Pravincoder
commited on
Commit
β’
77bddf4
1
Parent(s):
5309a67
Few major updates
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from sklearn.linear_model import LinearRegression
|
|
4 |
import gradio as gr
|
5 |
|
6 |
# Data Loading
|
7 |
-
house_data = './
|
8 |
houses = pd.read_csv(house_data)
|
9 |
|
10 |
# Feature Selection
|
@@ -30,11 +30,11 @@ def input(area,living_area,bedrooms,bathrooms,floors):
|
|
30 |
demo = gr.Interface(
|
31 |
input,
|
32 |
[
|
33 |
-
gr.Slider(minimum=
|
34 |
-
gr.Slider(minimum=
|
35 |
-
gr.Slider(minimum=1, maximum=
|
36 |
-
gr.Slider(minimum=1, maximum=
|
37 |
-
gr.Slider(minimum=1,maximum=3
|
38 |
],
|
39 |
"number",
|
40 |
examples=[
|
@@ -44,35 +44,39 @@ demo = gr.Interface(
|
|
44 |
[28000,3000,5,3,3],
|
45 |
],
|
46 |
title="Indian House Price Prediction Model",
|
47 |
-
description='''
|
|
|
48 |
|
49 |
-
|
|
|
50 |
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
Number of Bedrooms: The count of bedrooms in the house.
|
56 |
-
Number of Bathrooms: The count of bathrooms in the house.
|
57 |
-
Number of Floors: The total number of floors in the house.
|
58 |
|
59 |
-
|
|
|
|
|
60 |
|
61 |
-
|
|
|
62 |
|
63 |
-
|
|
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
***Disclaimer:***
|
72 |
-
|
73 |
-
While this model provides estimations, actual house prices may vary due to additional factors not considered in this model. It is advisable to consult with real estate experts for precise valuations.
|
74 |
-
|
75 |
-
Feel free to customize this description based on any additional details or specific characteristics of your model'''
|
76 |
)
|
77 |
|
78 |
if __name__ == "__main__":
|
|
|
4 |
import gradio as gr
|
5 |
|
6 |
# Data Loading
|
7 |
+
house_data = './Indiahouse'
|
8 |
houses = pd.read_csv(house_data)
|
9 |
|
10 |
# Feature Selection
|
|
|
30 |
demo = gr.Interface(
|
31 |
input,
|
32 |
[
|
33 |
+
gr.Slider(minimum=800, maximum=18500, randomize=True, label="Area of the House ***(Sq.mtr)***"),
|
34 |
+
gr.Slider(minimum=350, maximum=3000, randomize=True, step = 1,label="Living Area ***(Sq.mtr)***"),
|
35 |
+
gr.Slider(minimum=1, maximum=4, randomize=True,step = 1, label="Number of Bedrooms"),
|
36 |
+
gr.Slider(minimum=1, maximum=3, randomize=True,step = 1, label="Number of Bathrooms"),
|
37 |
+
gr.Slider(minimum=1,maximum=3,randomize=True,step=0.5,label="Number of stories/Floors")
|
38 |
],
|
39 |
"number",
|
40 |
examples=[
|
|
|
44 |
[28000,3000,5,3,3],
|
45 |
],
|
46 |
title="Indian House Price Prediction Model",
|
47 |
+
description='''"""
|
48 |
+
**Indian House Price Prediction Model**
|
49 |
|
50 |
+
*Overview:*
|
51 |
+
This model predicts house prices in India using Linear Regression. Trained on key features like lot area, living area, bedrooms, bathrooms, and floors, it estimates house prices based on historical data.
|
52 |
|
53 |
+
π*Features:*
|
54 |
+
- Lot Area
|
55 |
+
- Living Area
|
56 |
+
- Bedrooms
|
57 |
+
- Bathrooms
|
58 |
+
- Floors
|
59 |
|
60 |
+
β*How it works:*
|
61 |
+
Linear Regression analyzes the relationship between input features and house prices, establishing a linear equation for predictions.
|
|
|
|
|
|
|
62 |
|
63 |
+
π*Usage:*
|
64 |
+
1. Input specific values for lot area, living area, bedrooms, bathrooms, and floors.
|
65 |
+
2. Get an estimated house price based on the learned linear relationship.
|
66 |
|
67 |
+
π³*Application:*
|
68 |
+
Useful for individuals in the Indian real estate market to gauge approximate house prices. Ideal for property buyers, sellers, and real estate professionals for informed decision-making.
|
69 |
|
70 |
+
π*Disclaimer:*
|
71 |
+
This model provides estimations. Actual house prices may vary due to unconsidered factors. Consult real estate experts for precise valuations.
|
72 |
|
73 |
+
π€*Demo Info:*
|
74 |
+
- Mean Absolute Error (MAE): 0.11
|
75 |
+
- The Output of the Model depends on the DataSet
|
76 |
+
- For demo and learning purposes only.
|
77 |
|
78 |
+
β₯Feel free to explore and understand how key features influence house prices in India.β₯
|
79 |
+
"""'''
|
|
|
|
|
|
|
|
|
|
|
80 |
)
|
81 |
|
82 |
if __name__ == "__main__":
|