Pravincoder commited on
Commit
77bddf4
β€’
1 Parent(s): 5309a67

Few major updates

Browse files
Files changed (1) hide show
  1. app.py +31 -27
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 = './India_house_Price300'
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=1000, maximum=30000, randomize=True, label="Area of the House"),
34
- gr.Slider(minimum=600, maximum=7000, randomize=True, step = 1,label="Living Area"),
35
- gr.Slider(minimum=1, maximum=8, randomize=True,step = 1, label="Number of Bedrooms"),
36
- gr.Slider(minimum=1, maximum=5, randomize=True,step = 1, label="Number of Bathrooms"),
37
- gr.Slider(minimum=1,maximum=3.5,randomize=True,step=0.5,label="Number of stories/Floors")
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='''***Overview:***
 
48
 
49
- This Gradio-powered Indian House Prediction Model employs Linear Regression to estimate house prices based on essential features. The model is trained on a dataset that includes key factors influencing house prices in India.
 
50
 
51
- ***Features:***
 
 
 
 
 
52
 
53
- Lot Area: The total area of the plot on which the house is built.
54
- Living Area: The total living space within the house.
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
- ***How it works:***
 
 
60
 
61
- *Linear Regression analyzes the relationship between these features and the house prices. By learning from historical data, the model establishes a linear equation that maps these input features to the predicted house price.*
 
62
 
63
- ***Usage:***
 
64
 
65
- Input Features: Users input the specific values for the house's lot area, living area, number of bedrooms, bathrooms, and floors.
66
- Prediction: The model processes these inputs and provides an estimated house price based on the learned linear relationship.
67
- Application:
 
68
 
69
- This predictive model is valuable for individuals in the Indian real estate market looking to get an approximate idea of house prices based on specific characteristics. It can be a useful tool for property buyers, sellers, and real estate professionals to make informed decisions.
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__":