vibs08 commited on
Commit
225fb1b
·
verified ·
1 Parent(s): d6b0953

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -30,6 +30,8 @@ from fastapi import FastAPI, File, UploadFile, HTTPException
30
  from fastapi.responses import JSONResponse
31
  import datetime
32
  import tempfile
 
 
33
 
34
 
35
  app = FastAPI()
@@ -280,7 +282,8 @@ async def upload_image(file: UploadFile = File(...)):
280
  obj_file_path = step_1_generate_obj(image)
281
 
282
  # Generate a unique name for the S3 object
283
- obj_name = f"object{uuid.uuid4()}.obj"
 
284
 
285
  # Upload the OBJ file to S3
286
  s3_url = upload_file_to_s3(obj_file_path, 'framebucket3d', obj_name)
 
30
  from fastapi.responses import JSONResponse
31
  import datetime
32
  import tempfile
33
+ import time
34
+
35
 
36
 
37
  app = FastAPI()
 
282
  obj_file_path = step_1_generate_obj(image)
283
 
284
  # Generate a unique name for the S3 object
285
+ timestamp = int(time.time())
286
+ obj_name = f"object{timestamp}.obj"
287
 
288
  # Upload the OBJ file to S3
289
  s3_url = upload_file_to_s3(obj_file_path, 'framebucket3d', obj_name)