modelo-3d / app.py
NicolasG2523's picture
Update app.py
4e5d257 verified
raw
history blame
712 Bytes
import gradio as gr
def generate_3d_model(image):
# Esta versión de prueba ignora la imagen y devuelve un modelo 3D GLB funcional
return "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Duck/glTF-Binary/Duck.glb"
with gr.Blocks() as demo:
gr.Markdown("## 🧠 Genera tu modelo 3D desde una imagen")
gr.Markdown("Sube una imagen y obtén un modelo 3D generado automáticamente.")
with gr.Row():
image_input = gr.Image(type="filepath", label="Sube tu imagen")
btn = gr.Button("Generar modelo 3D")
output = gr.Model3D(label="Vista previa del modelo 3D")
btn.click(fn=generate_3d_model, inputs=image_input, outputs=output)
demo.launch()