Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,15 @@ df = pd.read_csv('Map-City-State-Zip-Lat-Long.txt', dtype=str, sep=';')
|
|
6 |
st.title("Input a city or zip code and we will take you there!")
|
7 |
|
8 |
city_name = st.text_input("Please search for a city:")
|
9 |
-
lat = df[df["City"] == city_name]["Latitude"].values[]
|
|
|
|
|
10 |
|
11 |
st.write(lat)
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
|
17 |
|
18 |
|
|
|
6 |
st.title("Input a city or zip code and we will take you there!")
|
7 |
|
8 |
city_name = st.text_input("Please search for a city:")
|
9 |
+
lat = df[df["City"] == city_name]["Latitude"].values[0]
|
10 |
+
lon = df[df["City"] == city_name]["Longitude"].values[0]
|
11 |
+
|
12 |
|
13 |
st.write(lat)
|
14 |
|
15 |
+
if city_name != "":
|
16 |
+
st.map({'cities' : city_name, 'lat' : lat, 'lon' : lon})
|
17 |
+
st.write(city_name, "is located at: ", lat "," lon)
|
18 |
|
19 |
|
20 |
|