sinanonur commited on
Commit
45f1e43
·
verified ·
1 Parent(s): 483d644

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -78,11 +78,15 @@ with gr.Blocks() as iface:
78
  resize_flag = gr.Checkbox(label="Resize Image (Longer Side)")
79
  resize_value = gr.Slider(256, 4096, step=16, value=2048, label="Resize Value")
80
 
81
- output_images = gr.Image(type="filepath", label="Processed Image")
82
-
 
83
  # Update the number of outputs based on the loaded profiles
84
  profiles_json_input.change(fn=update_outputs, inputs=profiles_json_input, outputs=output_images)
85
 
86
- image_input.submit(fn=gradio_interface, inputs=[image_input, profiles_json_input, selected_profile, chroma_override_flag, chroma_override_value, blur_override_flag, blur_override_value, color_temp_flag, color_temp_value, cross_process_flag, curve_type, resize_flag, resize_value], outputs=output_images)
 
 
 
87
 
88
  iface.launch(share=True)
 
78
  resize_flag = gr.Checkbox(label="Resize Image (Longer Side)")
79
  resize_value = gr.Slider(256, 4096, step=16, value=2048, label="Resize Value")
80
 
81
+ output_images = gr.Gallery(label="Processed Images")
82
+ process_button = gr.Button("Process Image")
83
+
84
  # Update the number of outputs based on the loaded profiles
85
  profiles_json_input.change(fn=update_outputs, inputs=profiles_json_input, outputs=output_images)
86
 
87
+ # Trigger image processing when the button is clicked
88
+ process_button.click(fn=gradio_interface,
89
+ inputs=[image_input, profiles_json_input, selected_profile, chroma_override_flag, chroma_override_value, blur_override_flag, blur_override_value, color_temp_flag, color_temp_value, cross_process_flag, curve_type, resize_flag, resize_value],
90
+ outputs=output_images)
91
 
92
  iface.launch(share=True)