Spaces:
Starting
Starting
Update app.py
Browse files
app.py
CHANGED
@@ -533,8 +533,9 @@ with gr.Blocks(css=css) as demo:
|
|
533 |
render = gr.Button("Render")
|
534 |
|
535 |
def on_submit(uploaded_video,model_type,coordinates):
|
536 |
-
|
537 |
global locations
|
|
|
|
|
538 |
if not coordinates:
|
539 |
locations_str = example_coords.split()
|
540 |
else:
|
@@ -549,8 +550,8 @@ with gr.Blocks(css=css) as demo:
|
|
549 |
avg_coords[0] = avg_coords[0] / len(locations_str)
|
550 |
avg_coords[1] = avg_coords[1] / len(locations_str)
|
551 |
|
552 |
-
for
|
553 |
-
locations[
|
554 |
print(locations)
|
555 |
|
556 |
# Process the video and get the path of the output video
|
|
|
533 |
render = gr.Button("Render")
|
534 |
|
535 |
def on_submit(uploaded_video,model_type,coordinates):
|
|
|
536 |
global locations
|
537 |
+
locations = []
|
538 |
+
|
539 |
if not coordinates:
|
540 |
locations_str = example_coords.split()
|
541 |
else:
|
|
|
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 |
|
557 |
# Process the video and get the path of the output video
|