Saqib commited on
Commit
d3c9c80
1 Parent(s): c5714b3

Update modules/app.py

Browse files
Files changed (1) hide show
  1. modules/app.py +3 -0
modules/app.py CHANGED
@@ -155,6 +155,9 @@ async def img2location(request: Request):
155
  if response.status != 200:
156
  return f"Failed to upload image: HTTP {response.status}"
157
  json_response = await response.json()
 
 
 
158
  return json_response
159
 
160
  @app.post("/pixart-sigma")
 
155
  if response.status != 200:
156
  return f"Failed to upload image: HTTP {response.status}"
157
  json_response = await response.json()
158
+ if json_response["message"]["latitude"] and json_response["message"]["longitude"]:
159
+ json_response["message"]["latitude"] = str(json_response["message"]["latitude"])
160
+ json_response["message"]["longitude"] = str(json_response["message"]["longitude"])
161
  return json_response
162
 
163
  @app.post("/pixart-sigma")