Spaces:
Runtime error
Runtime error
Commit
·
1007b31
1
Parent(s):
908ef1a
Update app.py
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ with gr.Blocks(css=css) as demo:
|
|
113 |
#image_vertical = gr.Image(interactive=True, tool="color-sketch", source="canvas", type="pil", shape=(512, 768), visible=False, brush_radius=45)
|
114 |
#with gr.Row():
|
115 |
# aspect = gr.Radio(["Square", "Horizontal", "Vertical"], value="Square", label="Aspect Ratio")
|
116 |
-
button_run = gr.Button("I've finished my sketch",elem_id="main_button", interactive=True
|
117 |
|
118 |
prompts = []
|
119 |
colors = []
|
@@ -133,7 +133,7 @@ with gr.Blocks(css=css) as demo:
|
|
133 |
''')
|
134 |
#css_height = gr.HTML("<style>#main-image{width: 512px} .fixed-height{height: 512px !important}</style>")
|
135 |
#aspect.change(update_css, inputs=aspect, outputs=[image, image_horizontal, image_vertical])
|
136 |
-
button_run.click(process_sketch, inputs=[canvas_data, binary_matrixes], outputs=[post_sketch, binary_matrixes, *color_row, *colors])
|
137 |
final_run_btn.click(process_generation, inputs=[binary_matrixes, general_prompt, *prompts], outputs=out_image)
|
138 |
demo.load(None, None, None, _js=load_js)
|
139 |
demo.launch(debug=True)
|
|
|
113 |
#image_vertical = gr.Image(interactive=True, tool="color-sketch", source="canvas", type="pil", shape=(512, 768), visible=False, brush_radius=45)
|
114 |
#with gr.Row():
|
115 |
# aspect = gr.Radio(["Square", "Horizontal", "Vertical"], value="Square", label="Aspect Ratio")
|
116 |
+
button_run = gr.Button("I've finished my sketch",elem_id="main_button", interactive=True)
|
117 |
|
118 |
prompts = []
|
119 |
colors = []
|
|
|
133 |
''')
|
134 |
#css_height = gr.HTML("<style>#main-image{width: 512px} .fixed-height{height: 512px !important}</style>")
|
135 |
#aspect.change(update_css, inputs=aspect, outputs=[image, image_horizontal, image_vertical])
|
136 |
+
button_run.click(process_sketch, inputs=[canvas_data, binary_matrixes], outputs=[post_sketch, binary_matrixes, *color_row, *colors], _js=get_js_colors)
|
137 |
final_run_btn.click(process_generation, inputs=[binary_matrixes, general_prompt, *prompts], outputs=out_image)
|
138 |
demo.load(None, None, None, _js=load_js)
|
139 |
demo.launch(debug=True)
|