skytnt commited on
Commit
95c6d27
1 Parent(s): 8ebd7dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -268,13 +268,14 @@ if __name__ == '__main__':
268
  with gr.Row():
269
  with gr.Column():
270
  gr.Markdown("generate image randomly or by seed")
271
- gen_input1 = gr.Radio(label="method", choices=["random", "use seed"], type="index")
272
- gen_input2 = gr.Number(value=1, label="seed")
 
273
  gen_input3 = gr.Slider(minimum=0, maximum=1, step=0.01, value=0.6, label="truncation psi")
274
  with gr.Group():
275
  gen_submit = gr.Button("Generate")
276
  with gr.Column():
277
- gen_output1 = gr.Image()
278
  select_img_input_w1 = gr.Variable()
279
  select_img_input_img1 = gr.Variable()
280
 
@@ -282,11 +283,11 @@ if __name__ == '__main__':
282
  with gr.Row():
283
  with gr.Column():
284
  gr.Markdown("you'd better upload a standing full-body image")
285
- encode_img_input = gr.Image()
286
  with gr.Group():
287
  encode_img_submit = gr.Button("Run")
288
  with gr.Column():
289
- encode_img_output1 = gr.Textbox(label="message")
290
  with gr.Row():
291
  encode_img_output2 = gr.Image(label="detected")
292
  encode_img_output3 = gr.Image(label="encoded")
@@ -305,7 +306,7 @@ if __name__ == '__main__':
305
  "current encoded image"], type="index")
306
  with gr.Group():
307
  select_img1_button = gr.Button("select")
308
- select_img1_output_img = gr.Image(label="image 1")
309
  select_img1_output_w = gr.Variable()
310
  with gr.Column():
311
  gr.Markdown("please select image 2")
@@ -314,13 +315,13 @@ if __name__ == '__main__':
314
  "current encoded image"], type="index")
315
  with gr.Group():
316
  select_img2_button = gr.Button("select")
317
- select_img2_output_img = gr.Image(label="image 2")
318
  select_img2_output_w = gr.Variable()
319
  generate_video_frame = gr.Slider(minimum=10, maximum=30, step=1, label="frame", value=15)
320
  with gr.Group():
321
  generate_video_button = gr.Button("Generate")
322
  with gr.Column():
323
- generate_video_output = gr.Video()
324
 
325
  gen_submit.click(gen_fn, [gen_input1, gen_input2, gen_input3],
326
  [gen_output1, select_img_input_w1, select_img_input_img1])
 
268
  with gr.Row():
269
  with gr.Column():
270
  gr.Markdown("generate image randomly or by seed")
271
+ with gr.Row():
272
+ gen_input1 = gr.Radio(label="method", choices=["random", "use seed"], type="index")
273
+ gen_input2 = gr.Number(value=1, label="seed ( int between -2^31 and 2^31 - 1 )")
274
  gen_input3 = gr.Slider(minimum=0, maximum=1, step=0.01, value=0.6, label="truncation psi")
275
  with gr.Group():
276
  gen_submit = gr.Button("Generate")
277
  with gr.Column():
278
+ gen_output1 = gr.Image(label="output image")
279
  select_img_input_w1 = gr.Variable()
280
  select_img_input_img1 = gr.Variable()
281
 
 
283
  with gr.Row():
284
  with gr.Column():
285
  gr.Markdown("you'd better upload a standing full-body image")
286
+ encode_img_input = gr.Image(label="input image")
287
  with gr.Group():
288
  encode_img_submit = gr.Button("Run")
289
  with gr.Column():
290
+ encode_img_output1 = gr.Textbox(label="output message")
291
  with gr.Row():
292
  encode_img_output2 = gr.Image(label="detected")
293
  encode_img_output3 = gr.Image(label="encoded")
 
306
  "current encoded image"], type="index")
307
  with gr.Group():
308
  select_img1_button = gr.Button("select")
309
+ select_img1_output_img = gr.Image(label="selected image 1")
310
  select_img1_output_w = gr.Variable()
311
  with gr.Column():
312
  gr.Markdown("please select image 2")
 
315
  "current encoded image"], type="index")
316
  with gr.Group():
317
  select_img2_button = gr.Button("select")
318
+ select_img2_output_img = gr.Image(label="selected image 2")
319
  select_img2_output_w = gr.Variable()
320
  generate_video_frame = gr.Slider(minimum=10, maximum=30, step=1, label="frame", value=15)
321
  with gr.Group():
322
  generate_video_button = gr.Button("Generate")
323
  with gr.Column():
324
+ generate_video_output = gr.Video(label="output video")
325
 
326
  gen_submit.click(gen_fn, [gen_input1, gen_input2, gen_input3],
327
  [gen_output1, select_img_input_w1, select_img_input_img1])