atatakun commited on
Commit
19d4d30
·
1 Parent(s): 5dcbd7d

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -213,8 +213,8 @@ def color_shuffler(img, res):
213
  model_inpaint = None
214
 
215
 
216
- def inpaint(img, res):
217
- image = resize_image(img, res)
218
  color = HWC3(image["image"])
219
  alpha = image["mask"][:, :, 0:1]
220
  result = np.concatenate([color, alpha], axis=2)
@@ -242,11 +242,12 @@ with block:
242
  with gr.Row():
243
  with gr.Column():
244
  input_image = gr.Image(source='upload', type="numpy", tool="sketch")
245
- resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
246
  run_button = gr.Button(label="Run")
247
  with gr.Column():
248
  gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
249
- run_button.click(fn=inpaint, inputs=[input_image, resolution], outputs=[gallery])
 
250
 
251
  gr.Markdown("<hr>")
252
  with gr.Row():
 
213
  model_inpaint = None
214
 
215
 
216
+ def inpaint(image):
217
+ # image = resize_image(img, res)
218
  color = HWC3(image["image"])
219
  alpha = image["mask"][:, :, 0:1]
220
  result = np.concatenate([color, alpha], axis=2)
 
242
  with gr.Row():
243
  with gr.Column():
244
  input_image = gr.Image(source='upload', type="numpy", tool="sketch")
245
+ # resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
246
  run_button = gr.Button(label="Run")
247
  with gr.Column():
248
  gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
249
+ # run_button.click(fn=inpaint, inputs=[input_image, resolution], outputs=[gallery])
250
+ run_button.click(fn=inpaint, inputs=[input_image], outputs=[gallery])
251
 
252
  gr.Markdown("<hr>")
253
  with gr.Row():