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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -17
app.py CHANGED
@@ -91,23 +91,24 @@ 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
- 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
- out_image = gr.Image()
 
111
 
112
  css_height = gr.HTML("<style>#main-image{width: 512px} .fixed-height{height: 512px !important}</style>")
113
 
 
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