linoyts HF Staff commited on
Commit
4b44286
·
verified ·
1 Parent(s): e96f400

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -196,24 +196,23 @@ following the algorithm proposed in [*IP-Composer: Semantic Composition of Visua
196
 
197
  with gr.Row():
198
  with gr.Column():
199
- base_image = gr.Image(label="Base Image (Required)", type="numpy")
200
- with gr.Tab("concepts"):
201
  with gr.Row():
202
  with gr.Group():
203
- concept_image1 = gr.Image(label="Concept Image 1 (Required)", type="numpy")
204
- concept_name1 = gr.Dropdown(concept_options, label="concept 1", value=None, info="concept type")
205
- rank1 = gr.Slider(minimum=1, maximum=50, value=30, step=1, label="Rank 1")
206
  with gr.Group():
207
  concept_image2 = gr.Image(label="Concept Image 2 (Optional)", type="numpy")
208
- concept_name2 = gr.Dropdown(concept_options, label="concept 2", value=None, info="concept type")
209
- rank2 = gr.Slider(minimum=1, maximum=50, value=30, step=1, label="Rank 2")
210
- with gr.Tab("optional - 3rd concept"):
211
  with gr.Group():
212
  concept_image3 = gr.Image(label="Concept Image 3 (Optional)", type="numpy")
213
- concept_name3 = gr.Dropdown(concept_options, label="concept 3", value= None, info="concept type")
214
- rank3 = gr.Slider(minimum=1, maximum=50, value=30, step=1, label="Rank 3")
215
-
216
- submit_btn = gr.Button("Generate")
217
 
218
  with gr.Accordion("Advanced options", open=False):
219
  prompt = gr.Textbox(label="Guidance Prompt (Optional)", placeholder="Optional text prompt to guide generation")
@@ -223,7 +222,8 @@ following the algorithm proposed in [*IP-Composer: Semantic Composition of Visua
223
  seed = gr.Number(value=0, label="Seed", precision=0)
224
 
225
  with gr.Column():
226
- output_image = gr.Image(label="composed output", show_label=True)
 
227
 
228
 
229
  submit_btn.click(
 
196
 
197
  with gr.Row():
198
  with gr.Column():
199
+ base_image = gr.Image(label="Base Image", type="numpy")
200
+ with gr.Tab("concepts to compose"):
201
  with gr.Row():
202
  with gr.Group():
203
+ concept_image1 = gr.Image(label="Concept Image 1", type="numpy")
204
+ concept_name1 = gr.Dropdown(concept_options, label="concept type", value=None, info="pick a concept")
205
+ rank1 = gr.Slider(minimum=1, maximum=50, value=30, step=1, label="Rank", info="")
206
  with gr.Group():
207
  concept_image2 = gr.Image(label="Concept Image 2 (Optional)", type="numpy")
208
+ concept_name2 = gr.Dropdown(concept_options, label="concept type", value=None, info="")
209
+ rank2 = gr.Slider(minimum=1, maximum=50, value=30, step=1, label="Rank")
210
+ with gr.Tab("optional - add 3rd concept"):
211
  with gr.Group():
212
  concept_image3 = gr.Image(label="Concept Image 3 (Optional)", type="numpy")
213
+ concept_name3 = gr.Dropdown(concept_options, label="concept type", value= None, info="pick a concept")
214
+ rank3 = gr.Slider(minimum=1, maximum=50, value=30, step=1, label="Rank")
215
+
 
216
 
217
  with gr.Accordion("Advanced options", open=False):
218
  prompt = gr.Textbox(label="Guidance Prompt (Optional)", placeholder="Optional text prompt to guide generation")
 
222
  seed = gr.Number(value=0, label="Seed", precision=0)
223
 
224
  with gr.Column():
225
+ output_image = gr.Image(label="Composed Image", show_label=True)
226
+ submit_btn = gr.Button("Generate")
227
 
228
 
229
  submit_btn.click(