BlockDetail commited on
Commit
64932c8
1 Parent(s): 1a2e6e1
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -34,21 +34,21 @@ with gr.Blocks() as demo:
34
  with gr.Row():
35
  stroke_type = gr.Radio(["Blocking", "Detail"], value="Detail", label="Stroke Type"),
36
  dilation_strength = gr.Slider(7, 117, value=65, step=2, label="Dilation Strength"),
37
- canvas = gr.ImageEditor(min_width=512, brush = gr.Brush(colors=["#000000"], default_size = 2, color_mode="fixed")).style(width=512, height=512)
38
  prompt_box = gr.Textbox(width="50vw", label="Prompt")
39
  with gr.Row():
40
- btn = gr.Button("Generate").style(width=100, height=80)
41
- btn2 = gr.Button("Reset").style(width=100, height=80)
42
  with gr.Column():
43
  num_samples = gr.Slider(1, 5, value=2, step=1, label="Num Samples to Generate"),
44
  with gr.Tab("Renoised Images"):
45
- gallery0 = gr.Gallery(show_label=False, columns=[num_samples[0].value], rows=[2], object_fit="contain", height="auto", preview=True, interactive=False).style(width=512, height=512)
46
  with gr.Tab("Renoised Overlay"):
47
- gallery1 = gr.Gallery(show_label=False, columns=[num_samples[0].value], rows=[2], object_fit="contain", height="auto", preview=True, interactive=False).style(width=512, height=512)
48
  with gr.Tab("Pre-Renoise Images"):
49
- gallery2 = gr.Gallery(show_label=False, columns=[num_samples[0].value], rows=[2], object_fit="contain", height="auto", preview=True, interactive=False).style(width=512, height=512)
50
  with gr.Tab("Pre-Renoise Overlay"):
51
- gallery3 = gr.Gallery(show_label=False, columns=[num_samples[0].value], rows=[2], object_fit="contain", height="auto", preview=True, interactive=False).style(width=512, height=512)
52
  for k in range(num_images):
53
  start_state.append([None, None])
54
  sketch_states = gr.State(start_state)
@@ -134,7 +134,7 @@ with gr.Blocks() as demo:
134
  color = "#0000FF"
135
  else:
136
  color = "#000000"
137
- return gr.Image(min_width=512, brush = gr.Brush(colors=[color], default_size = 2, color_mode="fixed")).style(width=400, height=400)
138
 
139
  def change_background(option):
140
  global all_gens
 
34
  with gr.Row():
35
  stroke_type = gr.Radio(["Blocking", "Detail"], value="Detail", label="Stroke Type"),
36
  dilation_strength = gr.Slider(7, 117, value=65, step=2, label="Dilation Strength"),
37
+ canvas = gr.ImageEditor(min_width=512, brush = gr.Brush(colors=["#000000"], default_size = 2, color_mode="fixed"), width=512, height=512)
38
  prompt_box = gr.Textbox(width="50vw", label="Prompt")
39
  with gr.Row():
40
+ btn = gr.Button("Generate", width=100, height=80)
41
+ btn2 = gr.Button("Reset", width=100, height=80)
42
  with gr.Column():
43
  num_samples = gr.Slider(1, 5, value=2, step=1, label="Num Samples to Generate"),
44
  with gr.Tab("Renoised Images"):
45
+ gallery0 = gr.Gallery(show_label=False, columns=[num_samples[0].value], rows=[2], object_fit="contain", height="auto", preview=True, interactive=False, width=512, height=512)
46
  with gr.Tab("Renoised Overlay"):
47
+ gallery1 = gr.Gallery(show_label=False, columns=[num_samples[0].value], rows=[2], object_fit="contain", height="auto", preview=True, interactive=False, width=512, height=512)
48
  with gr.Tab("Pre-Renoise Images"):
49
+ gallery2 = gr.Gallery(show_label=False, columns=[num_samples[0].value], rows=[2], object_fit="contain", height="auto", preview=True, interactive=False, width=512, height=512)
50
  with gr.Tab("Pre-Renoise Overlay"):
51
+ gallery3 = gr.Gallery(show_label=False, columns=[num_samples[0].value], rows=[2], object_fit="contain", height="auto", preview=True, interactive=False, width=512, height=512)
52
  for k in range(num_images):
53
  start_state.append([None, None])
54
  sketch_states = gr.State(start_state)
 
134
  color = "#0000FF"
135
  else:
136
  color = "#000000"
137
+ return gr.Image(min_width=512, brush = gr.Brush(colors=[color], default_size = 2, color_mode="fixed"), width=512, height=512)
138
 
139
  def change_background(option):
140
  global all_gens