Fabrice-TIERCELIN commited on
Commit
953f5bd
·
verified ·
1 Parent(s): d724bbb

Global update

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -476,6 +476,10 @@ with gr.Blocks(css=css) as demo:
476
  img = Image.open(image_filepath)
477
  orig_w, orig_h = img.size
478
  new_h, new_w = calculate_new_dimensions(orig_w, orig_h)
 
 
 
 
479
  return gr.update(value=new_h), gr.update(value=new_w)
480
  except Exception as e:
481
  # Keep current slider values on error
 
476
  img = Image.open(image_filepath)
477
  orig_w, orig_h = img.size
478
  new_h, new_w = calculate_new_dimensions(orig_w, orig_h)
479
+ global height_input_debug_value
480
+ height_input_debug_value = new_h
481
+ global width_input_debug_value
482
+ width_input_debug_value = new_w
483
  return gr.update(value=new_h), gr.update(value=new_w)
484
  except Exception as e:
485
  # Keep current slider values on error