Spaces:
Sleeping
Sleeping
print long and lan
Browse files
app.py
CHANGED
|
@@ -225,8 +225,7 @@ async def upload_image(
|
|
| 225 |
|
| 226 |
await file.seek(0)
|
| 227 |
lat, lon = get_gps_location(file.file)
|
| 228 |
-
location_point = f"Point({lon:.6f} {lat:.6f})" if lat and lon else None
|
| 229 |
-
location = f"{lon:.6f} {lat:.6f}" if lat and lon else location
|
| 230 |
guid = str(uuid.uuid4())
|
| 231 |
variance_levels = ["Low", "Mid", "High"]
|
| 232 |
getvariancevalue = random.choice(variance_levels) if category == "potholes" else None
|
|
@@ -239,7 +238,7 @@ async def upload_image(
|
|
| 239 |
"image_name": file.filename,
|
| 240 |
"image_url": url,
|
| 241 |
"location": location_point,
|
| 242 |
-
"location_text":
|
| 243 |
"status": "In Progress",
|
| 244 |
"category": category,
|
| 245 |
"approved": is_approved,
|
|
|
|
| 225 |
|
| 226 |
await file.seek(0)
|
| 227 |
lat, lon = get_gps_location(file.file)
|
| 228 |
+
location_point = f"Point({lon:.6f} {lat:.6f})" if lat and lon else None
|
|
|
|
| 229 |
guid = str(uuid.uuid4())
|
| 230 |
variance_levels = ["Low", "Mid", "High"]
|
| 231 |
getvariancevalue = random.choice(variance_levels) if category == "potholes" else None
|
|
|
|
| 238 |
"image_name": file.filename,
|
| 239 |
"image_url": url,
|
| 240 |
"location": location_point,
|
| 241 |
+
"location_text": f"{lon:.6f} {lat:.6f}",
|
| 242 |
"status": "In Progress",
|
| 243 |
"category": category,
|
| 244 |
"approved": is_approved,
|