Spaces:
Running
on
Zero
Running
on
Zero
| import spaces | |
| import gradio as gr | |
| from glob import glob | |
| def gen_shape(): | |
| print("do nothing") | |
| def get_example_img_list(): | |
| print('Loading example img list ...') | |
| return sorted(glob('./assets/example_images/**/*.png', recursive=True)) | |
| example_imgs = get_example_img_list() | |
| title = "## Image to 3D" | |
| description = "A lightweight image to 3D converter" | |
| with gr.Blocks().queue() as demo: | |
| gr.Markdown(title) | |
| gr.Markdown(description) | |
| with gr.Row(): | |
| with gr.Column(scale=3): | |
| gr.Markdown("#### Image Prompt") | |
| image = gr.Image(sources=["upload"], label='Image', type='pil', image_mode='RGBA', height=290) | |
| with gr.Column(scale=6): | |
| gr.Markdown("#### Generated Mesh") | |
| with gr.Column(scale=3): | |
| gr.Markdown("#### Image Examples") | |
| gr.Examples(examples=example_imgs, inputs=[image], | |
| label=None, examples_per_page=18) | |
| demo.launch() |