Borya-Goldarb commited on
Commit
36dfd92
·
verified ·
1 Parent(s): 6dd4c55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -4,7 +4,7 @@ import pandas as pd
4
 
5
  def get_market_submarket(df, google_ola):
6
  filtered_row = df[df['google_ola'] == google_ola].iloc[0]
7
- return filtered_row['market_costar'], filtered_row['submarket_costar']
8
 
9
  def main():
10
  st.set_page_config(initial_sidebar_state="collapsed")
@@ -21,12 +21,15 @@ def main():
21
 
22
  if 'user_select_value' not in st.session_state:
23
  st.session_state['user_select_value'] = ""
24
- if 'year_buit' not in st.session_state:
25
- st.session_state['year_buit'] = 1990
26
  if 'execution_dates' not in st.session_state:
27
  st.session_state['execution_dates'] = 2014
28
  if 'LSF' not in st.session_state:
29
  st.session_state['LSF'] = 75000
 
 
 
30
 
31
  st.title("Search")
32
  df_properties = pd.read_csv("market_underwriting_pred_short_atlanta.csv", encoding='utf-8')
@@ -58,12 +61,15 @@ def main():
58
  if selected_option == "":
59
  st.write(":red[Please choose the property address]")
60
  else:
 
61
  st.session_state['user_select_value'] = selected_option
62
- st.session_state['year_buit'] = 1990
63
  st.session_state['execution_dates'] = 2014
64
- market_val, submarket_val = get_market_submarket(df_properties, selected_option)
65
  st.session_state['market_val'] = market_val
66
  st.session_state['submarket_val'] = submarket_val
 
 
67
 
68
  st.switch_page("pages/market_rent_estimation.py")
69
 
 
4
 
5
  def get_market_submarket(df, google_ola):
6
  filtered_row = df[df['google_ola'] == google_ola].iloc[0]
7
+ return filtered_row['prediction'], filtered_row['building_sf'], filtered_row['market_costar'], filtered_row['submarket_costar']
8
 
9
  def main():
10
  st.set_page_config(initial_sidebar_state="collapsed")
 
21
 
22
  if 'user_select_value' not in st.session_state:
23
  st.session_state['user_select_value'] = ""
24
+ if 'property_lsf' not in st.session_state:
25
+ st.session_state['property_lsf'] = 0
26
  if 'execution_dates' not in st.session_state:
27
  st.session_state['execution_dates'] = 2014
28
  if 'LSF' not in st.session_state:
29
  st.session_state['LSF'] = 75000
30
+ if 'prediction' not in st.session_state:
31
+ st.session_state['prediction'] = 0
32
+
33
 
34
  st.title("Search")
35
  df_properties = pd.read_csv("market_underwriting_pred_short_atlanta.csv", encoding='utf-8')
 
61
  if selected_option == "":
62
  st.write(":red[Please choose the property address]")
63
  else:
64
+
65
  st.session_state['user_select_value'] = selected_option
66
+
67
  st.session_state['execution_dates'] = 2014
68
+ prediction, property_lsf, market_val, submarket_val = get_market_submarket(df_properties, selected_option)
69
  st.session_state['market_val'] = market_val
70
  st.session_state['submarket_val'] = submarket_val
71
+ st.session_state['property_lsf'] = property_lsf
72
+ st.session_state['prediction'] = prediction
73
 
74
  st.switch_page("pages/market_rent_estimation.py")
75