vibs08 commited on
Commit
c561654
·
verified ·
1 Parent(s): 530d878

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -227,8 +227,8 @@ async def process_image(
227
  preprocessed = preprocess(image_pil, do_remove_background, foreground_ratio)
228
  mesh_name_obj, mesh_name_glb = generate(preprocessed, mc_resolution)
229
  timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S%f')
230
- object_name = f'object_{timestamp}_1.obj'
231
- object_name_2 = f'object_{timestamp}_2.glb'
232
  object_name_3 = f"object_{timestamp}.png"
233
  preprocessed_image_tempfile = tempfile.NamedTemporaryFile(suffix=".png", delete=False)
234
  preprocessed.save(preprocessed_image_tempfile.name)
@@ -238,6 +238,7 @@ async def process_image(
238
  # torch.cuda.synchronize() # Wait for all CUDA operations to complete
239
  # torch.cuda.empty_cache()
240
  return {
 
241
  "obj_path": f"https://framebucket3d.s3.amazonaws.com/{object_name}",
242
  "glb_path": f"https://framebucket3d.s3.amazonaws.com/{object_name_2}"
243
  }
 
227
  preprocessed = preprocess(image_pil, do_remove_background, foreground_ratio)
228
  mesh_name_obj, mesh_name_glb = generate(preprocessed, mc_resolution)
229
  timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S%f')
230
+ object_name = f'object_{timestamp}.obj'
231
+ object_name_2 = f'object_{timestamp}.glb'
232
  object_name_3 = f"object_{timestamp}.png"
233
  preprocessed_image_tempfile = tempfile.NamedTemporaryFile(suffix=".png", delete=False)
234
  preprocessed.save(preprocessed_image_tempfile.name)
 
238
  # torch.cuda.synchronize() # Wait for all CUDA operations to complete
239
  # torch.cuda.empty_cache()
240
  return {
241
+ "img_path": f"https://framebucket3d.s3.amazonaws.com/{object_name}"
242
  "obj_path": f"https://framebucket3d.s3.amazonaws.com/{object_name}",
243
  "glb_path": f"https://framebucket3d.s3.amazonaws.com/{object_name_2}"
244
  }