Spaces:
Runtime error
Runtime error
Update gradio_app/gradio_3dgen.py
Browse files- gradio_app/gradio_3dgen.py +22 -3
gradio_app/gradio_3dgen.py
CHANGED
|
@@ -45,8 +45,28 @@ def generate3dv2(preview_img, input_processing, seed, render_video=True, do_refi
|
|
| 45 |
def create_ui(concurrency_id="wkl"):
|
| 46 |
with gr.Row():
|
| 47 |
with gr.Column(scale=1):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
input_image = gr.Image(type='pil', image_mode='RGBA', label='Frontview')
|
| 49 |
|
|
|
|
| 50 |
example_folder = os.path.join(os.path.dirname(__file__), "./examples")
|
| 51 |
example_fns = sorted([os.path.join(example_folder, example) for example in os.listdir(example_folder)])
|
| 52 |
gr.Examples(
|
|
@@ -56,10 +76,9 @@ def create_ui(concurrency_id="wkl"):
|
|
| 56 |
label='Examples',
|
| 57 |
examples_per_page=12
|
| 58 |
)
|
| 59 |
-
|
| 60 |
-
|
| 61 |
with gr.Column(scale=1):
|
| 62 |
-
#
|
| 63 |
output_mesh = gr.Model3D(value=None, label="Mesh Model", show_label=True, height=320, camera_position=(90, 90, 2))
|
| 64 |
output_video = gr.Video(label="Preview", show_label=True, show_share_button=True, height=320, visible=False)
|
| 65 |
|
|
|
|
| 45 |
def create_ui(concurrency_id="wkl"):
|
| 46 |
with gr.Row():
|
| 47 |
with gr.Column(scale=1):
|
| 48 |
+
# Mensaje de agradecimiento para @hysts
|
| 49 |
+
gr.Markdown("""
|
| 50 |
+
### Special Thanks
|
| 51 |
+
A big thank you to [@hysts](https://huggingface.co/hysts) for their help in making the "Duplicate this Space" feature work correctly!
|
| 52 |
+
""")
|
| 53 |
+
|
| 54 |
+
# Bot贸n "Duplicate this Space"
|
| 55 |
+
gr.HTML("""
|
| 56 |
+
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;">
|
| 57 |
+
<p style="display: flex; gap: 6px;">
|
| 58 |
+
<a href="https://huggingface.co/spaces/cavargas10/Unico3D?duplicate=true">
|
| 59 |
+
<img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/duplicate-this-space-lg.svg" alt="Duplicate this Space">
|
| 60 |
+
</a>
|
| 61 |
+
</p>
|
| 62 |
+
<p>to skip the queue and enjoy faster inference on the GPU of your choice</p>
|
| 63 |
+
</div>
|
| 64 |
+
""")
|
| 65 |
+
|
| 66 |
+
# Campo para ingresar la imagen
|
| 67 |
input_image = gr.Image(type='pil', image_mode='RGBA', label='Frontview')
|
| 68 |
|
| 69 |
+
# Ejemplos
|
| 70 |
example_folder = os.path.join(os.path.dirname(__file__), "./examples")
|
| 71 |
example_fns = sorted([os.path.join(example_folder, example) for example in os.listdir(example_folder)])
|
| 72 |
gr.Examples(
|
|
|
|
| 76 |
label='Examples',
|
| 77 |
examples_per_page=12
|
| 78 |
)
|
| 79 |
+
|
|
|
|
| 80 |
with gr.Column(scale=1):
|
| 81 |
+
# Exportar modelo 3D y video
|
| 82 |
output_mesh = gr.Model3D(value=None, label="Mesh Model", show_label=True, height=320, camera_position=(90, 90, 2))
|
| 83 |
output_video = gr.Video(label="Preview", show_label=True, show_share_button=True, height=320, visible=False)
|
| 84 |
|