Sudipta Nayak commited on
Commit
0784f64
·
1 Parent(s): c22c5c5

Updated file

Browse files
Files changed (1) hide show
  1. app/main.py +3 -2
app/main.py CHANGED
@@ -38,7 +38,7 @@ async def detect_objects(request: Request, file: UploadFile):
38
  print('File name:', file.filename)
39
 
40
  input_file_path = f"app/static/{file.filename}"
41
- output_file_path = f"app/static/output/"
42
 
43
  # Save the uploaded file
44
  with open(input_file_path, "wb") as input_file:
@@ -63,7 +63,8 @@ async def detect_objects(request: Request, file: UploadFile):
63
  "result.html",
64
  {"request": request, "original_image": original_image_path, "output_image": output_image_path},
65
  )
66
- # return templates.TemplateResponse("index.html", {"request": request})
 
67
 
68
  except Exception as e:
69
  logging.error(f"Error in /detect endpoint: {str(e)}")
 
38
  print('File name:', file.filename)
39
 
40
  input_file_path = f"app/static/{file.filename}"
41
+ output_file_path = f"app/static/output"
42
 
43
  # Save the uploaded file
44
  with open(input_file_path, "wb") as input_file:
 
63
  "result.html",
64
  {"request": request, "original_image": original_image_path, "output_image": output_image_path},
65
  )
66
+ # return StreamingResponse(open(output_file, "rb"), media_type="video/mp4")
67
+
68
 
69
  except Exception as e:
70
  logging.error(f"Error in /detect endpoint: {str(e)}")