multimodalart HF staff commited on
Commit
1e24c47
1 Parent(s): 8f6f9b7

Update app.py

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