artificialguybr commited on
Commit
2a72c8b
1 Parent(s): 310544d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -156,8 +156,6 @@ with gr.Blocks() as app:
156
  button = gr.Button("Run")
157
 
158
  result = gr.Image(interactive=False, label="Generated Image")
159
- post_processed_result = gr.Image(interactive=False, label="Post-Processed Image")
160
-
161
  # Accordion moved here, inside the same gr.Blocks context
162
  with gr.Accordion(label="Pixel art", open=True):
163
  with gr.Row():
@@ -189,8 +187,6 @@ with gr.Blocks() as app:
189
  palette_image = gr.Image(label="Color palette image", type="pil")
190
  palette_size_custom = gr.Slider(label="Palette Size", minimum=1, maximum=256, step=1, value=16)
191
  dither_methods_custom = gr.Radio(choices=["None", "Floyd-Steinberg"], label="Colors Dither Method", value="None")
192
-
193
- post_process_button = gr.Button("Apply Post-Processing")
194
 
195
  # The rest of your code for setting up the app
196
  gallery.select(update_selection, outputs=[prompt, selected_info, selected_state])
@@ -199,7 +195,7 @@ with gr.Blocks() as app:
199
  post_process_button.click(
200
  fn=postprocess,
201
  inputs=[
202
- post_processed_result,
203
  enabled,
204
  downscale,
205
  need_rescale,
@@ -221,7 +217,7 @@ with gr.Blocks() as app:
221
  palette_size_custom, # Updated this
222
  dither_methods_custom # Updated this
223
  ],
224
- outputs=[post_processed_result]
225
  )
226
 
227
  app.queue(max_size=20, concurrency_count=5)
 
156
  button = gr.Button("Run")
157
 
158
  result = gr.Image(interactive=False, label="Generated Image")
 
 
159
  # Accordion moved here, inside the same gr.Blocks context
160
  with gr.Accordion(label="Pixel art", open=True):
161
  with gr.Row():
 
187
  palette_image = gr.Image(label="Color palette image", type="pil")
188
  palette_size_custom = gr.Slider(label="Palette Size", minimum=1, maximum=256, step=1, value=16)
189
  dither_methods_custom = gr.Radio(choices=["None", "Floyd-Steinberg"], label="Colors Dither Method", value="None")
 
 
190
 
191
  # The rest of your code for setting up the app
192
  gallery.select(update_selection, outputs=[prompt, selected_info, selected_state])
 
195
  post_process_button.click(
196
  fn=postprocess,
197
  inputs=[
198
+ result,
199
  enabled,
200
  downscale,
201
  need_rescale,
 
217
  palette_size_custom, # Updated this
218
  dither_methods_custom # Updated this
219
  ],
220
+ outputs=[result]
221
  )
222
 
223
  app.queue(max_size=20, concurrency_count=5)