piyk commited on
Commit
ba3a659
1 Parent(s): b1f75f5

Update src/app.py

Browse files
Files changed (1) hide show
  1. src/app.py +5 -4
src/app.py CHANGED
@@ -150,10 +150,10 @@ with gr.Blocks(css=css) as demo:
150
  with gr.Row():
151
  with gr.Column():
152
  input_image = gr.Image(type="pil", label="Input Image")
153
- run_button = gr.ClearButton(components=None, value="Enhance Image")
154
  with gr.Column():
155
  output_slider = ImageSlider(label="Before / After")
156
- run_button.add(output_slider)
157
 
158
  with gr.Accordion("Advanced Options", open=False):
159
  prompt = gr.Textbox(
@@ -233,7 +233,7 @@ with gr.Blocks(css=css) as demo:
233
  label="Solver",
234
  )
235
 
236
- run_button.click(
237
  fn=process,
238
  inputs=[
239
  input_image,
@@ -272,4 +272,5 @@ with gr.Blocks(css=css) as demo:
272
  run_on_click=False,
273
  )
274
 
275
- demo.launch(share=False)
 
 
150
  with gr.Row():
151
  with gr.Column():
152
  input_image = gr.Image(type="pil", label="Input Image")
153
+ run_btn = gr.ClearButton(components=None, value="Enhance Image")
154
  with gr.Column():
155
  output_slider = ImageSlider(label="Before / After")
156
+ run_btn.add(output_slider)
157
 
158
  with gr.Accordion("Advanced Options", open=False):
159
  prompt = gr.Textbox(
 
233
  label="Solver",
234
  )
235
 
236
+ run_btn.click(
237
  fn=process,
238
  inputs=[
239
  input_image,
 
272
  run_on_click=False,
273
  )
274
 
275
+ if __name__ == "__main__":
276
+ demo.queue(max_size=20).launch()