Commit
·
fce9e32
1
Parent(s):
da9710b
Update app.py
Browse files
app.py
CHANGED
|
@@ -89,28 +89,26 @@ with gr.Blocks(css=css) as demo:
|
|
| 89 |

|
| 90 |
''')
|
| 91 |
with gr.Row():
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
prompts.append(gr.Textbox(label="Prompt for this color"))
|
| 111 |
-
final_run_btn = gr.Button("Generate!")
|
| 112 |
|
| 113 |
-
|
| 114 |
|
| 115 |
css_height = gr.HTML("<style>#main-image{width: 512px} .fixed-height{height: 512px !important}</style>")
|
| 116 |
|
|
|
|
| 89 |

|
| 90 |
''')
|
| 91 |
with gr.Row():
|
| 92 |
+
with gr.Box(elem_id="main-image"):
|
| 93 |
+
with gr.Row():
|
| 94 |
+
image = gr.Image(interactive=True, tool="color-sketch", source="canvas", type="pil")
|
| 95 |
+
with gr.Row():
|
| 96 |
+
aspect = gr.Radio(["Square", "Horizontal", "Vertical"], value="Square", label="Aspect Ratio")
|
| 97 |
+
button_run = gr.Button("I've finished my sketch",elem_id="main_button")
|
| 98 |
+
|
| 99 |
+
prompts = []
|
| 100 |
+
colors = []
|
| 101 |
+
color_row = [None] * MAX_COLORS
|
| 102 |
+
with gr.Column(visible=False) as post_sketch:
|
| 103 |
+
general_prompt = gr.Textbox(label="General Prompt")
|
| 104 |
+
for n in range(MAX_COLORS):
|
| 105 |
+
with gr.Row(visible=False) as color_row[n]:
|
| 106 |
+
with gr.Box(elem_id="color-bg"):
|
| 107 |
+
colors.append(gr.HTML('<div class="color-bg-item" style="background-color: black"></div>'))
|
| 108 |
+
prompts.append(gr.Textbox(label="Prompt for this color"))
|
| 109 |
+
final_run_btn = gr.Button("Generate!")
|
|
|
|
|
|
|
| 110 |
|
| 111 |
+
out_image = gr.Image(label="Result")
|
| 112 |
|
| 113 |
css_height = gr.HTML("<style>#main-image{width: 512px} .fixed-height{height: 512px !important}</style>")
|
| 114 |
|