Ankan Ghosh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -61,8 +61,20 @@ with gr.Blocks(title="Creating Panorama using OpenCV") as demo:
|
|
61 |
gr.Markdown("Upload the series of images sequentially and get the perfect Panorama!")
|
62 |
|
63 |
with gr.Row(equal_height=True):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
with gr.Column():
|
65 |
image_upload = gr.Gallery(
|
|
|
66 |
columns=4,
|
67 |
label="Upload Images",
|
68 |
file_types=["image"],
|
@@ -81,16 +93,7 @@ with gr.Blocks(title="Creating Panorama using OpenCV") as demo:
|
|
81 |
with gr.Column():
|
82 |
stitched_output = gr.Image(label="Stitched Panorama")
|
83 |
cropped_output = gr.Image(label="Cropped Panorama")
|
84 |
-
|
85 |
-
# [["./Apollo-8-Launch.png", "./times_square.jpg"], True, 90, 867, 1, 2000],
|
86 |
-
# ]
|
87 |
-
|
88 |
-
# with gr.Row():
|
89 |
-
# gr.Examples(
|
90 |
-
# examples=examples,
|
91 |
-
# inputs=[image_upload, crop_checkbox, y_start, y_end, x_start, x_end],
|
92 |
-
# label="Load Example Images",
|
93 |
-
# )
|
94 |
|
95 |
# Disable cropping input fields if checkbox is not selected
|
96 |
def toggle_crop_inputs(crop):
|
|
|
61 |
gr.Markdown("Upload the series of images sequentially and get the perfect Panorama!")
|
62 |
|
63 |
with gr.Row(equal_height=True):
|
64 |
+
|
65 |
+
examples = [
|
66 |
+
"./scene/scene1.jpg",
|
67 |
+
"./scene/scene2.jpg",
|
68 |
+
"./scene/scene3.jpg",
|
69 |
+
"./scene/scene4.jpg",
|
70 |
+
"./scene/scene5.jpg",
|
71 |
+
"./scene/scene6.jpg",
|
72 |
+
"./scene/scene7.jpg",
|
73 |
+
"./scene/scene8.jpg",
|
74 |
+
]
|
75 |
with gr.Column():
|
76 |
image_upload = gr.Gallery(
|
77 |
+
value=examples,
|
78 |
columns=4,
|
79 |
label="Upload Images",
|
80 |
file_types=["image"],
|
|
|
93 |
with gr.Column():
|
94 |
stitched_output = gr.Image(label="Stitched Panorama")
|
95 |
cropped_output = gr.Image(label="Cropped Panorama")
|
96 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
# Disable cropping input fields if checkbox is not selected
|
99 |
def toggle_crop_inputs(crop):
|