Spaces:
Running
Running
LaurentTRIPIED
commited on
Commit
•
fb72145
1
Parent(s):
ff94d3c
Pytorch v.45
Browse files
app.py
CHANGED
@@ -13,9 +13,9 @@ def get_data():
|
|
13 |
cleaned_data = [{'nom': record['fields'].get('nom'),
|
14 |
'adresse': record['fields'].get('adresse'),
|
15 |
'engagement_rse': record['fields'].get('rse', 'Non'),
|
16 |
-
'lat': record['fields'].get('geo_point_2d', [None])[0],
|
17 |
-
'lon': record['fields'].get('geo_point_2d', [None])[1]}
|
18 |
-
for record in data]
|
19 |
return cleaned_data
|
20 |
except requests.RequestException as e:
|
21 |
print(f"Erreur lors de la récupération des données : {e}")
|
|
|
13 |
cleaned_data = [{'nom': record['fields'].get('nom'),
|
14 |
'adresse': record['fields'].get('adresse'),
|
15 |
'engagement_rse': record['fields'].get('rse', 'Non'),
|
16 |
+
'lat': record['fields'].get('geo_point_2d', [None, None])[0],
|
17 |
+
'lon': record['fields'].get('geo_point_2d', [None, None])[1]}
|
18 |
+
for record in data if 'geo_point_2d' in record['fields']]
|
19 |
return cleaned_data
|
20 |
except requests.RequestException as e:
|
21 |
print(f"Erreur lors de la récupération des données : {e}")
|