multimodalart HF staff commited on
Commit
fce9e32
1 Parent(s): da9710b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -21
app.py CHANGED
@@ -89,28 +89,26 @@ with gr.Blocks(css=css) as demo:
89
  ![Examples](https://multidiffusion.github.io/pics/tight.jpg)
90
  ''')
91
  with gr.Row():
92
- with gr.Box(elem_id="main-image"):
93
- #with gr.Accordion(open=True, label="Your color sketch") as sketch_accordion:
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
 
113
- out_image = gr.Image()
114
 
115
  css_height = gr.HTML("<style>#main-image{width: 512px} .fixed-height{height: 512px !important}</style>")
116
 
 
89
  ![Examples](https://multidiffusion.github.io/pics/tight.jpg)
90
  ''')
91
  with gr.Row():
92
+ with gr.Box(elem_id="main-image"):
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
 
111
+ out_image = gr.Image(label="Result")
112
 
113
  css_height = gr.HTML("<style>#main-image{width: 512px} .fixed-height{height: 512px !important}</style>")
114