Spaces:
Running
Running
fix
Browse files
app.py
CHANGED
@@ -249,29 +249,14 @@ with gr.Blocks() as demo:
|
|
249 |
html_text = f"""
|
250 |
<div id="container">
|
251 |
<canvas id="before" width="{width}" height="{height}"></canvas><img id="canvas-before" style="display:none;"/>
|
|
|
|
|
252 |
<canvas id="after" width="{width}" height="{height}"></canvas><img id="canvas-after" style="display:none;"/>
|
253 |
</div>
|
254 |
"""
|
255 |
|
256 |
html = gr.HTML(html_text)
|
257 |
|
258 |
-
|
259 |
-
# image_display_with_grid_bef = gr.Image(type="pil", label="Before Image with Grid")
|
260 |
-
# image_display_with_grid_aft = gr.Image(type="pil", label="After Image with Grid")
|
261 |
-
|
262 |
-
# # Add click event to the displayed image
|
263 |
-
# image_display_with_grid_bef.select(
|
264 |
-
# handle_click,
|
265 |
-
# inputs=[image_display_with_grid_bef, selected_cells_bef, image_bef],
|
266 |
-
# outputs=[image_display_with_grid_bef, selected_cells_bef]
|
267 |
-
# )
|
268 |
-
|
269 |
-
# image_display_with_grid_aft.select(
|
270 |
-
# handle_click,
|
271 |
-
# inputs=[image_display_with_grid_aft, selected_cells_aft, image_aft],
|
272 |
-
# outputs=[image_display_with_grid_aft, selected_cells_aft]
|
273 |
-
# )
|
274 |
-
|
275 |
with gr.Row():
|
276 |
with gr.Column(scale=1):
|
277 |
# Example images
|
@@ -285,18 +270,6 @@ with gr.Blocks() as demo:
|
|
285 |
examples_per_page=5
|
286 |
)
|
287 |
|
288 |
-
# image_bef.change(
|
289 |
-
# fn=display_image,
|
290 |
-
# inputs=[image_bef],
|
291 |
-
# outputs=[image_display_with_grid_bef, selected_cells_bef]
|
292 |
-
# )
|
293 |
-
|
294 |
-
# image_aft.change(
|
295 |
-
# fn=display_image,
|
296 |
-
# inputs=[image_aft],
|
297 |
-
# outputs=[image_display_with_grid_aft, selected_cells_aft]
|
298 |
-
# )
|
299 |
-
|
300 |
with gr.Column(scale=1):
|
301 |
# Output components
|
302 |
prediction = gr.Textbox(label="Predicted caption")
|
|
|
249 |
html_text = f"""
|
250 |
<div id="container">
|
251 |
<canvas id="before" width="{width}" height="{height}"></canvas><img id="canvas-before" style="display:none;"/>
|
252 |
+
<br>
|
253 |
+
<br>
|
254 |
<canvas id="after" width="{width}" height="{height}"></canvas><img id="canvas-after" style="display:none;"/>
|
255 |
</div>
|
256 |
"""
|
257 |
|
258 |
html = gr.HTML(html_text)
|
259 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
with gr.Row():
|
261 |
with gr.Column(scale=1):
|
262 |
# Example images
|
|
|
270 |
examples_per_page=5
|
271 |
)
|
272 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
with gr.Column(scale=1):
|
274 |
# Output components
|
275 |
prediction = gr.Textbox(label="Predicted caption")
|