Spaces:
Running
on
Zero
Running
on
Zero
File size: 978 Bytes
75d84c2 27fc85d 5ecc81f 27fc85d 75d84c2 5ecc81f 27fc85d f882a9b 5ecc81f f882a9b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
import spaces
import gradio as gr
from glob import glob
@spaces.GPU(duration=60)
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() |