williambr commited on
Commit
e4de63b
·
1 Parent(s): a0877a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -17
app.py CHANGED
@@ -5,23 +5,19 @@ import pandas as pd
5
 
6
  st.title('Plot and track your vacations!')
7
 
 
 
8
  def load_lottie_url(url: str):
9
  r = requests.get(url)
10
  if r.status_code != 200:
11
  return None
12
  return r.json()
13
-
14
  def ShowAnimation(name, URL):
15
  anim=load_lottie_url(URL)
16
  st_lottie(anim, key = name)
17
-
18
  ShowAnimation("Badge1","https://assets2.lottiefiles.com/packages/lf20_jte9hafx.json")
19
 
20
-
21
- city_name = st.text_input('Please Input your Desired City:')
22
- lat = st.text_input('Please Input the Latitude:' )
23
- long = st.text_input('Please Input the Longitude:' )
24
-
25
  def add_bg_from_url():
26
  st.markdown(
27
  f"""
@@ -35,18 +31,20 @@ def add_bg_from_url():
35
  """,
36
  unsafe_allow_html=True
37
  )
38
-
39
  add_bg_from_url()
40
 
41
 
42
- cities_list = []
43
- cities_list.append(city_name)
44
-
45
- lat_list = []
46
- lat_list.append(lat)
47
-
48
- long_list = []
49
- long_list.append(long)
50
-
 
 
51
 
52
  places = pd.DataFrame({'cities:' : cities_list, 'lat:' : lat_list, 'lan:' : long_list})
 
 
5
 
6
  st.title('Plot and track your vacations!')
7
 
8
+
9
+ # Loads animation of the Earth
10
  def load_lottie_url(url: str):
11
  r = requests.get(url)
12
  if r.status_code != 200:
13
  return None
14
  return r.json()
 
15
  def ShowAnimation(name, URL):
16
  anim=load_lottie_url(URL)
17
  st_lottie(anim, key = name)
 
18
  ShowAnimation("Badge1","https://assets2.lottiefiles.com/packages/lf20_jte9hafx.json")
19
 
20
+ #Loads Background Image
 
 
 
 
21
  def add_bg_from_url():
22
  st.markdown(
23
  f"""
 
31
  """,
32
  unsafe_allow_html=True
33
  )
 
34
  add_bg_from_url()
35
 
36
 
37
+ city_name = st.text_input('Please Input your Desired City:')
38
+ cities_list = []
39
+ cities_list.append(city_name)
40
+
41
+ lat = st.text_input('Please Input the Latitude:' )
42
+ lat_list = []
43
+ lat_list.append(lat)
44
+
45
+ long = st.text_input('Please Input the Longitude:' )
46
+ long_list = []
47
+ long_list.append(long)
48
 
49
  places = pd.DataFrame({'cities:' : cities_list, 'lat:' : lat_list, 'lan:' : long_list})
50
+ st.map(places)