Spaces:
Running
on
Zero
Running
on
Zero
chore: gradio image to pil
Browse files
app.py
CHANGED
@@ -226,7 +226,7 @@ def generate_mesh(image, source_size=512, render_size=384, mesh_size=512, export
|
|
226 |
|
227 |
def step_1_generate_planes(image):
|
228 |
planes_path = generate_mesh(image)
|
229 |
-
return planes_path
|
230 |
|
231 |
def step_2_generate_obj(image):
|
232 |
mesh_path, _ = generate_mesh(image, export_mesh=True)
|
@@ -261,7 +261,11 @@ with gr.Blocks() as demo:
|
|
261 |
generate_mesh_button = gr.Button("生成模型")
|
262 |
generate_video_button = gr.Button("生成视频")
|
263 |
with gr.Column():
|
264 |
-
planes_output = gr.Image(
|
|
|
|
|
|
|
|
|
265 |
model_output = LitModel3D(
|
266 |
clear_color=[0, 0, 0, 0], # 可调整背景颜色,以获得更好的对比度
|
267 |
label="模型可视化",
|
|
|
226 |
|
227 |
def step_1_generate_planes(image):
|
228 |
planes_path = generate_mesh(image)
|
229 |
+
return planes_path
|
230 |
|
231 |
def step_2_generate_obj(image):
|
232 |
mesh_path, _ = generate_mesh(image, export_mesh=True)
|
|
|
261 |
generate_mesh_button = gr.Button("生成模型")
|
262 |
generate_video_button = gr.Button("生成视频")
|
263 |
with gr.Column():
|
264 |
+
planes_output = gr.Image(
|
265 |
+
label="平面图",
|
266 |
+
type="pil",
|
267 |
+
interactive=False
|
268 |
+
)
|
269 |
model_output = LitModel3D(
|
270 |
clear_color=[0, 0, 0, 0], # 可调整背景颜色,以获得更好的对比度
|
271 |
label="模型可视化",
|