amildravid4292 commited on
Commit
7cb4a60
·
verified ·
1 Parent(s): 7b8af8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -438,13 +438,12 @@ with gr.Blocks(css="style.css") as demo:
438
  with gr.Column():
439
  with gr.Row():
440
  with gr.Column():
441
- # input_image = gr.Image(source='upload', elem_id="image_upload", tool='sketch', type='pil', label="Upload image and draw to define mask",
442
- # height=512, width=512, brush_color='#00FFFF', mask_opacity=0.6)
443
- input_image = gr.ImageEditor(elem_id="image_upload", type='pil', label="Upload image and draw to define mask",
444
- height=512, width=512, brush=gr.Brush(), layers=False)
445
  with gr.Row():
446
  sample = gr.Button("🎲 Sample New Model")
447
- invert_button = gr.Button("⏪ Invert")
448
  with gr.Column():
449
  image_slider = ImageSlider(position=0.5, type="pil", height=512, width=512)
450
  # gallery1 = gr.Image(label="Identity from Original Model",height=512, width=512, interactive=False)
@@ -517,9 +516,9 @@ with gr.Blocks(css="style.css") as demo:
517
 
518
 
519
 
520
- invert_button.click(fn=run_inversion,
521
- inputs=[input_image, pcs, epochs, weight_decay,lr],
522
- outputs = [image_slider, file_output])
523
 
524
 
525
  sample.click(fn=sample_then_run, outputs=[input_image, file_output])
 
438
  with gr.Column():
439
  with gr.Row():
440
  with gr.Column():
441
+ input_image = gr.Image(label="Identity from Sampled or Uploaded Model", height=512, width=512)
442
+ # input_image = gr.ImageEditor(elem_id="image_upload", type='pil', label="Upload image and draw to define mask",
443
+ # height=512, width=512, brush=gr.Brush(), layers=False)
 
444
  with gr.Row():
445
  sample = gr.Button("🎲 Sample New Model")
446
+ # invert_button = gr.Button("⏪ Invert")
447
  with gr.Column():
448
  image_slider = ImageSlider(position=0.5, type="pil", height=512, width=512)
449
  # gallery1 = gr.Image(label="Identity from Original Model",height=512, width=512, interactive=False)
 
516
 
517
 
518
 
519
+ # invert_button.click(fn=run_inversion,
520
+ # inputs=[input_image, pcs, epochs, weight_decay,lr],
521
+ # outputs = [image_slider, file_output])
522
 
523
 
524
  sample.click(fn=sample_then_run, outputs=[input_image, file_output])