Update app.py
Browse files
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 |
-
|
| 442 |
-
#
|
| 443 |
-
|
| 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 |
-
|
| 522 |
-
|
| 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])
|