Spaces:
Running
Running
Upload 2 files
Browse files- app.py +23 -0
- requirements.txt +2 -0
app.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from huggingface_hub import snapshot_download
|
3 |
+
import tempfile
|
4 |
+
import os
|
5 |
+
|
6 |
+
def generate_3d_model(image):
|
7 |
+
# Placeholder: en producci贸n se conecta con Hunyuan3D
|
8 |
+
# Aqu铆 solo se simula una respuesta
|
9 |
+
return "https://huggingface.co/datasets/huggingface/3d-assets/resolve/main/bunny.glb"
|
10 |
+
|
11 |
+
with gr.Blocks() as demo:
|
12 |
+
gr.Markdown("## 馃 Genera tu modelo 3D desde una imagen")
|
13 |
+
gr.Markdown("Sube una imagen y obt茅n un modelo 3D generado autom谩ticamente.")
|
14 |
+
|
15 |
+
with gr.Row():
|
16 |
+
image_input = gr.Image(type="filepath", label="Sube tu imagen")
|
17 |
+
|
18 |
+
btn = gr.Button("Generar modelo 3D")
|
19 |
+
output = gr.Model3D(label="Vista previa del modelo 3D")
|
20 |
+
|
21 |
+
btn.click(fn=generate_3d_model, inputs=image_input, outputs=output)
|
22 |
+
|
23 |
+
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
gradio==4.24.0
|
2 |
+
huggingface_hub
|