freealise commited on
Commit
643a5cb
1 Parent(s): df7ff25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -547,10 +547,12 @@ with gr.Blocks(css=css) as demo:
547
  location = location.split(',')
548
  avg_coords[0] = avg_coords[0] + float(location[0])
549
  avg_coords[1] = avg_coords[1] + float(location[1])
 
550
  avg_coords[0] = avg_coords[0] / len(locations_str)
551
  avg_coords[1] = avg_coords[1] / len(locations_str)
552
 
553
  for location in locations_str:
 
554
  locations.append([ float(location[0]) - avg_coords[0], float(location[1]) - avg_coords[1] ])
555
  print(locations)
556
 
 
547
  location = location.split(',')
548
  avg_coords[0] = avg_coords[0] + float(location[0])
549
  avg_coords[1] = avg_coords[1] + float(location[1])
550
+
551
  avg_coords[0] = avg_coords[0] / len(locations_str)
552
  avg_coords[1] = avg_coords[1] / len(locations_str)
553
 
554
  for location in locations_str:
555
+ location = location.split(',')
556
  locations.append([ float(location[0]) - avg_coords[0], float(location[1]) - avg_coords[1] ])
557
  print(locations)
558