Spaces:
Runtime error
Runtime error
gsheet
Browse files
app.py
CHANGED
|
@@ -189,7 +189,8 @@ with st.form("inputs"):
|
|
| 189 |
|
| 190 |
fig, ax = plt.subplots()
|
| 191 |
sns.swarmplot(x=['']*len(geosubset), y=geosubset['resale_pri'], orient='v', ax=ax, hue=geosubset['transactDa'].dt.year, alpha=0.75)
|
| 192 |
-
plt.scatter(0, prediction_price, color='
|
|
|
|
| 193 |
plt.text(0.05, prediction_price, 'Your predicted property price')
|
| 194 |
plt.ylabel('Resale Price ($)')
|
| 195 |
plt.title('Swarmplot of nearby similar properties')
|
|
@@ -308,8 +309,9 @@ with st.form("inputs"):
|
|
| 308 |
"https://www.googleapis.com/auth/drive"]
|
| 309 |
|
| 310 |
|
| 311 |
-
credentials = ServiceAccountCredentials.from_json_keyfile_dict(
|
| 312 |
client = gspread.authorize(credentials)
|
| 313 |
|
| 314 |
sheet = client.open("PropertyPricePredictor_Sheet").sheet1
|
| 315 |
sheet.append_row([datetime.now().strftime('%Y-%m-%d %H:%M:%S'), int(input_postal),input_storey,input_age_asof_transaction,input_floor_area_sqft,input_propertyType])
|
|
|
|
|
|
| 189 |
|
| 190 |
fig, ax = plt.subplots()
|
| 191 |
sns.swarmplot(x=['']*len(geosubset), y=geosubset['resale_pri'], orient='v', ax=ax, hue=geosubset['transactDa'].dt.year, alpha=0.75)
|
| 192 |
+
plt.scatter(0, prediction_price, color='black')
|
| 193 |
+
plt.legend(loc='upper left')
|
| 194 |
plt.text(0.05, prediction_price, 'Your predicted property price')
|
| 195 |
plt.ylabel('Resale Price ($)')
|
| 196 |
plt.title('Swarmplot of nearby similar properties')
|
|
|
|
| 309 |
"https://www.googleapis.com/auth/drive"]
|
| 310 |
|
| 311 |
|
| 312 |
+
credentials = ServiceAccountCredentials.from_json_keyfile_dict(keydict, scope)
|
| 313 |
client = gspread.authorize(credentials)
|
| 314 |
|
| 315 |
sheet = client.open("PropertyPricePredictor_Sheet").sheet1
|
| 316 |
sheet.append_row([datetime.now().strftime('%Y-%m-%d %H:%M:%S'), int(input_postal),input_storey,input_age_asof_transaction,input_floor_area_sqft,input_propertyType])
|
| 317 |
+
st.markdown(f'_Number of searches till date: {len(sheet.get_values('A:A'))-1}_')
|