arjun-radha-krishnan commited on
Commit
fcbdb4c
·
verified ·
1 Parent(s): f8fce5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -24,18 +24,18 @@ def show_map(places_list):
24
  desc = place['description']
25
 
26
  try:
27
- locate = geolocator.geocode(f"{attraction}, {city}")
28
  except:
29
  locate = None
30
 
31
  if locate is None:
32
  try:
33
- locate = geolocator.geocode(f"{city}")
34
  except:
35
  locate = None
36
 
37
  if locate is None:
38
- locate = geolocator.geocode("Dortmund, Germany")
39
 
40
  if locate is not None:
41
  if i == 0:
 
24
  desc = place['description']
25
 
26
  try:
27
+ locate = await geolocator.geocode(f"{attraction}, {city}", timeout=10)
28
  except:
29
  locate = None
30
 
31
  if locate is None:
32
  try:
33
+ locate = await geolocator.geocode(f"{city}", timeout=10)
34
  except:
35
  locate = None
36
 
37
  if locate is None:
38
+ locate = await geolocator.geocode("Dortmund, Germany", timeout=10)
39
 
40
  if locate is not None:
41
  if i == 0: