multimodalart HF staff commited on
Commit
251a915
1 Parent(s): c590a10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,7 +21,7 @@ def process_sketch(image, binary_matrixes):
21
  if any(c != 255 for c in (r, g, b)):
22
  binary_matrix = create_binary_matrix(im2arr, (r,g,b))
23
  binary_matrixes.append(binary_matrix)
24
- colors_fixed.append(gr.update(value=f'<div><img src="file/{binary_matrix}" /><div class="color-bg-item" style="background-color: rgb({r},{g},{b})"></div></div>'))
25
  visibilities = []
26
  colors = []
27
  for n in range(MAX_COLORS):
@@ -81,7 +81,7 @@ with gr.Blocks(css=css) as demo:
81
  with gr.Row(visible=False) as color_row[n]:
82
  with gr.Box(elem_id="color-bg"):
83
  colors.append(gr.HTML('<div class="color-bg-item" style="background-color: black"></div>'))
84
- prompts.append(gr.Textbox(label="Prompt for this color"))
85
  final_run_btn = gr.Button("Generate!")
86
 
87
  out_image = gr.Image(label="Result")
 
21
  if any(c != 255 for c in (r, g, b)):
22
  binary_matrix = create_binary_matrix(im2arr, (r,g,b))
23
  binary_matrixes.append(binary_matrix)
24
+ colors_fixed.append(gr.update(value=f'<div style="display:flex;align-items: center;justify-content: center"><img width="20%" src="file/{binary_matrix}" /><div class="color-bg-item" style="background-color: rgb({r},{g},{b})"></div></div>'))
25
  visibilities = []
26
  colors = []
27
  for n in range(MAX_COLORS):
 
81
  with gr.Row(visible=False) as color_row[n]:
82
  with gr.Box(elem_id="color-bg"):
83
  colors.append(gr.HTML('<div class="color-bg-item" style="background-color: black"></div>'))
84
+ prompts.append(gr.Textbox(label="Prompt for this mask"))
85
  final_run_btn = gr.Button("Generate!")
86
 
87
  out_image = gr.Image(label="Result")