UjjwalKGupta commited on
Commit
abb799c
·
verified ·
1 Parent(s): cb77475

Add decode_url

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -390,7 +390,8 @@ def calculate_geometry_metrics(file_url: str):
390
  found, and returns the results in JSON format.
391
  """
392
  try:
393
- input_gdf = get_gdf_from_url(file_url)
 
394
  input_gdf = preprocess_gdf(input_gdf)
395
  geometry_gdf = next((input_gdf.iloc[[i]] for i in range(len(input_gdf)) if is_valid_polygon(input_gdf.iloc[[i]])), None)
396
  geometry_gdf = to_best_crs(geometry_gdf)
 
390
  found, and returns the results in JSON format.
391
  """
392
  try:
393
+ decoded_url = unquote(file_url)
394
+ input_gdf = get_gdf_from_url(decoded_url)
395
  input_gdf = preprocess_gdf(input_gdf)
396
  geometry_gdf = next((input_gdf.iloc[[i]] for i in range(len(input_gdf)) if is_valid_polygon(input_gdf.iloc[[i]])), None)
397
  geometry_gdf = to_best_crs(geometry_gdf)