Spaces:
Sleeping
Sleeping
staswrs
commited on
Commit
·
ecfd160
1
Parent(s):
972e6a2
fix add normals 6
Browse files
app.py
CHANGED
@@ -68,10 +68,6 @@ rmbg_net.eval()
|
|
68 |
|
69 |
|
70 |
def generate(image_path, face_number=50000, guidance_scale=5.0, num_steps=25):
|
71 |
-
print("[API CALL] image_path =", image_path)
|
72 |
-
print("[API CALL] type =", type(image_path))
|
73 |
-
print("[API CALL] face_number =", face_number)
|
74 |
-
|
75 |
print("[API CALL] image_path received:", image_path)
|
76 |
print("[API CALL] File exists:", os.path.exists(image_path))
|
77 |
|
@@ -127,26 +123,15 @@ def generate(image_path, face_number=50000, guidance_scale=5.0, num_steps=25):
|
|
127 |
|
128 |
|
129 |
# Интерфейс Gradio
|
130 |
-
# demo = gr.Interface(
|
131 |
-
# fn=generate,
|
132 |
-
# inputs=gr.Image(type="filepath", label="Upload image"),
|
133 |
-
# outputs=gr.File(label="Download .glb"),
|
134 |
-
# title="TripoSG Image to 3D",
|
135 |
-
# description="Upload an image to generate a 3D model (.glb)",
|
136 |
-
# )
|
137 |
-
|
138 |
demo = gr.Interface(
|
139 |
fn=generate,
|
140 |
-
inputs=
|
141 |
-
gr.Image(type="filepath", label="Upload image"),
|
142 |
-
gr.Number(label="Face Number"),
|
143 |
-
gr.Number(label="Guidance Scale"),
|
144 |
-
gr.Number(label="Num Steps"),
|
145 |
-
],
|
146 |
outputs=gr.File(label="Download .glb"),
|
147 |
title="TripoSG Image to 3D",
|
148 |
description="Upload an image to generate a 3D model (.glb)",
|
149 |
)
|
150 |
|
|
|
|
|
151 |
# Запуск
|
152 |
demo.launch()
|
|
|
68 |
|
69 |
|
70 |
def generate(image_path, face_number=50000, guidance_scale=5.0, num_steps=25):
|
|
|
|
|
|
|
|
|
71 |
print("[API CALL] image_path received:", image_path)
|
72 |
print("[API CALL] File exists:", os.path.exists(image_path))
|
73 |
|
|
|
123 |
|
124 |
|
125 |
# Интерфейс Gradio
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
demo = gr.Interface(
|
127 |
fn=generate,
|
128 |
+
inputs=gr.Image(type="filepath", label="Upload image"),
|
|
|
|
|
|
|
|
|
|
|
129 |
outputs=gr.File(label="Download .glb"),
|
130 |
title="TripoSG Image to 3D",
|
131 |
description="Upload an image to generate a 3D model (.glb)",
|
132 |
)
|
133 |
|
134 |
+
|
135 |
+
|
136 |
# Запуск
|
137 |
demo.launch()
|