jonathanjordan21 commited on
Commit
038a4a2
·
verified ·
1 Parent(s): 7e2aa92

Update utils2.py

Browse files
Files changed (1) hide show
  1. utils2.py +4 -4
utils2.py CHANGED
@@ -138,24 +138,24 @@ def compute_features(candidate_point, api_key, radius=5000):
138
  }
139
 
140
  for i,place in enumerate(GOOGLE_PLACE_TYPE_MAPPING):
141
- total_count = await compute_places_count_with_api_key(
142
  api_key,
143
  lat,
144
  lon,
145
  radius,
146
  place
147
- )
148
 
149
  features[f'num_{DATASET_COLUMNS[i]}'] = total_count
150
 
151
 
152
- n_banks = compute_places_count_with_api_key(
153
  api_key,
154
  lat,
155
  lon,
156
  radius,
157
  ['atm']
158
- )
159
 
160
 
161
  features.update({
 
138
  }
139
 
140
  for i,place in enumerate(GOOGLE_PLACE_TYPE_MAPPING):
141
+ total_count = asyncio.run(compute_places_count_with_api_key(
142
  api_key,
143
  lat,
144
  lon,
145
  radius,
146
  place
147
+ ))
148
 
149
  features[f'num_{DATASET_COLUMNS[i]}'] = total_count
150
 
151
 
152
+ n_banks = asyncio.run(compute_places_count_with_api_key(
153
  api_key,
154
  lat,
155
  lon,
156
  radius,
157
  ['atm']
158
+ ))
159
 
160
 
161
  features.update({