Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ try:
|
|
27 |
#use the city dateframe to confirm you are using the right map
|
28 |
lat = city_df[city_df["State"] == state_name]["Latitude"].values[0]
|
29 |
lon = city_df[city_df["State"] == state_name]["Longitude"].values[0]
|
30 |
-
zipCode = city_df[city_df["State"] == state_name]["Zip"].values[0]
|
31 |
city_list = []
|
32 |
lat_list = []
|
33 |
long_list = []
|
@@ -38,11 +38,13 @@ try:
|
|
38 |
long_list.append(lon)
|
39 |
st.map(pd.DataFrame({'cities' : city_list, 'lat' : lat_list, 'lon' : long_list}))
|
40 |
st.write(city_name, "is located at: ", lat, ",", lon)
|
41 |
-
st.write("The zip code is: ", zipCode)
|
42 |
st.write("Would you like to save this location?")
|
43 |
-
|
|
|
|
|
44 |
st.write("Saved!")
|
45 |
except:
|
46 |
-
st.write("
|
47 |
|
48 |
|
|
|
27 |
#use the city dateframe to confirm you are using the right map
|
28 |
lat = city_df[city_df["State"] == state_name]["Latitude"].values[0]
|
29 |
lon = city_df[city_df["State"] == state_name]["Longitude"].values[0]
|
30 |
+
#zipCode = city_df[city_df["State"] == state_name]["Zip"].values[0]
|
31 |
city_list = []
|
32 |
lat_list = []
|
33 |
long_list = []
|
|
|
38 |
long_list.append(lon)
|
39 |
st.map(pd.DataFrame({'cities' : city_list, 'lat' : lat_list, 'lon' : long_list}))
|
40 |
st.write(city_name, "is located at: ", lat, ",", lon)
|
41 |
+
#st.write("The zip code is: ", zipCode)
|
42 |
st.write("Would you like to save this location?")
|
43 |
+
save_button = st.button("Save")
|
44 |
+
|
45 |
+
if save_button:
|
46 |
st.write("Saved!")
|
47 |
except:
|
48 |
+
st.write("Try Again")
|
49 |
|
50 |
|