venkat-srinivasan-nexusflow commited on
Commit
d18c34d
Β·
verified Β·
1 Parent(s): 5560d6b

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +2 -4
tools.py CHANGED
@@ -305,12 +305,10 @@ class Tools:
305
  and "name" in place_name["results"]
306
  ):
307
  place_name = place_name["results"]["name"]
308
- if "vicinity" in place_name["results"]:
309
- place_name += ", " + place_name["results"]["vicinity"]
310
  elif isinstance(place_name, dict) and "name" in place_name:
311
  place_name = place_name["name"]
312
- if "vicinity" in place_name:
313
- place_name += ", " + place_name["vicinity"]
314
 
315
  print (f"Reformatted it as {place_name}!")
316
  place_details = self.get_latitude_longitude(place_name)
 
305
  and "name" in place_name["results"]
306
  ):
307
  place_name = place_name["results"]["name"]
308
+ place_name += ", " + place_name["results"]["vicinity"]
 
309
  elif isinstance(place_name, dict) and "name" in place_name:
310
  place_name = place_name["name"]
311
+ place_name += ", " + place_name["vicinity"]
 
312
 
313
  print (f"Reformatted it as {place_name}!")
314
  place_details = self.get_latitude_longitude(place_name)