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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -15,7 +15,7 @@ llm_client = InferenceClient(model=repo_id, timeout=180, token=os.getenv("HF_TOK
15
 
16
  def show_map(places_list):
17
 
18
- geolocator = Nominatim(user_agent="HF_smart-travel-planner", adapter_factory=AioHTTPAdapter)
19
 
20
  i = 0
21
  for place in places_list:
@@ -24,18 +24,18 @@ def show_map(places_list):
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:
 
15
 
16
  def show_map(places_list):
17
 
18
+ geolocator = Nominatim(user_agent="HF_smart-travel-planner") #, adapter_factory=AioHTTPAdapter)
19
 
20
  i = 0
21
  for place in places_list:
 
24
  desc = place['description']
25
 
26
  try:
27
+ locate = geolocator.geocode(f"{attraction}, {city}", timeout=10)
28
  except:
29
  locate = None
30
 
31
  if locate is None:
32
  try:
33
+ locate = geolocator.geocode(f"{city}", timeout=10)
34
  except:
35
  locate = None
36
 
37
  if locate is None:
38
+ locate = geolocator.geocode("Dortmund, Germany", timeout=10)
39
 
40
  if locate is not None:
41
  if i == 0: