Global update
Browse files
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
|