AMontiB commited on
Commit
7c57ed0
·
1 Parent(s): f479f2f
Files changed (1) hide show
  1. shadows.py +3 -3
shadows.py CHANGED
@@ -338,10 +338,10 @@ def build_gradio_interface():
338
  def store_original(img, orig):
339
  """Store the original image when a new image is uploaded."""
340
  if img is not None:
341
- return img, img # Store the new image as original
342
- return img, orig # Keep existing original if no new image
343
 
344
- img_in.change(store_original, inputs=[img_in, original_image], outputs=[img_in, original_image])
345
 
346
  # link buttons to mode change
347
  start_y.click(on_mode_change, inputs=[gr.State("yellow"), img_in, current_mode, current_points, y_lines, r_lines, y_pairs, r_pairs],
 
338
  def store_original(img, orig):
339
  """Store the original image when a new image is uploaded."""
340
  if img is not None:
341
+ return img # Store the new image as original
342
+ return orig # Keep existing original if no new image
343
 
344
+ img_in.change(store_original, inputs=[img_in, original_image], outputs=[original_image])
345
 
346
  # link buttons to mode change
347
  start_y.click(on_mode_change, inputs=[gr.State("yellow"), img_in, current_mode, current_points, y_lines, r_lines, y_pairs, r_pairs],