Create new file
Browse files
app.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import requests
|
| 3 |
+
from streamlit_lottie import st_lottie
|
| 4 |
+
import pandas as pd
|
| 5 |
+
|
| 6 |
+
st.title('Mark a point on the map, and I will take you there!')
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
city_name = st.text_input('Please type the name of your city')
|
| 11 |
+
lat = st.number_input('Please type your latitude:')
|
| 12 |
+
long = st.number_input('Please type your longitude')
|
| 13 |
+
city_list = []
|
| 14 |
+
lat_list = []
|
| 15 |
+
long_list = []
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
if city_name != "" and lat != "" and long != "":
|
| 19 |
+
city_list.append(city_name)
|
| 20 |
+
lat_list.append(lat)
|
| 21 |
+
long_list.append(long)
|
| 22 |
+
st.map(pd.DataFrame({'cities' : city_list, 'lat' : lat_list, 'lon' : long_list}))
|