-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrental_predict_app.py
More file actions
36 lines (29 loc) · 967 Bytes
/
Copy pathrental_predict_app.py
File metadata and controls
36 lines (29 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import streamlit as st
import app.property_builder as ml
from app.app_builder import app_builder
def main():
ren_app=app_builder()
ren_app._get_bedrooms()
ren_app._get_bathrooms()
ren_app._get_den()
ren_app._get_postal_code()
ren_app._get_lat_lon()
ren_app._build()
if ren_app._btn_submit:
prop=ml.property_builder()
prop.set_bedrooms(ren_app._bedrooms)
prop.set_bathrooms(ren_app._bathrooms)
prop.set_den(ren_app._den)
prop.set_postalcode(ren_app._postal_code)
prop.set_latitude(ren_app._latitude)
prop.set_longitude(ren_app._longitude)
prop.find_neighborhood()
prop.build_df()
st.write(prop._df)
prop.encode_neighborhood()
prop.scale_features()
prop.find_rental_price()
prop.build()
st.success(f"CAD {int(prop._rental_price[0])} per month would be a good rental price.")
if __name__=="__main__":
main()