Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -193,8 +193,8 @@ def run_example(image, do_remove_background, foreground_ratio, mc_resolution, te
|
|
193 |
image_pil = generate_image_from_text(encoded_image=image, pos_prompt=text_prompt)
|
194 |
else:
|
195 |
image_pil = generate_image_from_text(encoded_image=image)
|
196 |
-
preprocessed = preprocess(image_pil,
|
197 |
-
mesh_name_obj, mesh_name_glb = generate(preprocessed,
|
198 |
return preprocessed, mesh_name_obj, mesh_name_glb
|
199 |
|
200 |
with gr.Blocks() as demo:
|
@@ -209,7 +209,7 @@ with gr.Blocks() as demo:
|
|
209 |
sources="upload",
|
210 |
type="pil",
|
211 |
elem_id="content_image",
|
212 |
-
visible=True
|
213 |
)
|
214 |
text_prompt = gr.Textbox(
|
215 |
label="Text Prompt",
|
@@ -264,7 +264,7 @@ with gr.Blocks() as demo:
|
|
264 |
# )
|
265 |
submit.click(fn=check_input_image, inputs=[input_image]).success(
|
266 |
fn=run_example,
|
267 |
-
inputs=[input_image,
|
268 |
outputs=[processed_image, output_model_obj, output_model_glb],
|
269 |
# outputs=[output_model_obj, output_model_glb],
|
270 |
)
|
|
|
193 |
image_pil = generate_image_from_text(encoded_image=image, pos_prompt=text_prompt)
|
194 |
else:
|
195 |
image_pil = generate_image_from_text(encoded_image=image)
|
196 |
+
preprocessed = preprocess(image_pil, False, 0.9)
|
197 |
+
mesh_name_obj, mesh_name_glb = generate(preprocessed, 256, ["obj", "glb"])
|
198 |
return preprocessed, mesh_name_obj, mesh_name_glb
|
199 |
|
200 |
with gr.Blocks() as demo:
|
|
|
209 |
sources="upload",
|
210 |
type="pil",
|
211 |
elem_id="content_image",
|
212 |
+
visible=True
|
213 |
)
|
214 |
text_prompt = gr.Textbox(
|
215 |
label="Text Prompt",
|
|
|
264 |
# )
|
265 |
submit.click(fn=check_input_image, inputs=[input_image]).success(
|
266 |
fn=run_example,
|
267 |
+
inputs=[input_image, do_remove_background, foreground_ratio, mc_resolution, text_prompt],
|
268 |
outputs=[processed_image, output_model_obj, output_model_glb],
|
269 |
# outputs=[output_model_obj, output_model_glb],
|
270 |
)
|