aki-0421 commited on
Commit
e5cd8c6
·
unverified ·
1 Parent(s): 99f7ac7
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -19,14 +19,15 @@ def generate_images(input_image: Image.Image) -> List[Image.Image]:
19
 
20
  return multi_view_generator.infer(white_image=white_image)
21
 
22
-
23
  with gr.Blocks() as demo:
24
  gr.Markdown("# GPU-accelerated Image Processing")
25
  with gr.Row():
26
- input_image = gr.Image(label="Input Image", type="pil") # 入力はPIL形式
27
- output_gallery = gr.Gallery(label="Output Images (25 Variations)").style(grid=(5, 5))
28
- submit_button = gr.Button("Generate")
 
29
 
30
- submit_button.click(generate_images, inputs=input_image, outputs=output_gallery)
 
31
 
32
  demo.launch()
 
19
 
20
  return multi_view_generator.infer(white_image=white_image)
21
 
 
22
  with gr.Blocks() as demo:
23
  gr.Markdown("# GPU-accelerated Image Processing")
24
  with gr.Row():
25
+ input_image = gr.Image(label="Input Image", type="pil")
26
+ output_gallery = gr.Gallery(
27
+ label="Generated images", show_label=False, elem_id="gallery"
28
+ , columns=[3], object_fit="contain", height="auto")
29
 
30
+ btn = gr.Button("Generate")
31
+ btn.click(generate_images, input_image, output_gallery)
32
 
33
  demo.launch()