Ashrafb commited on
Commit
e6a420e
·
verified ·
1 Parent(s): 95be706

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -1
main.py CHANGED
@@ -20,7 +20,8 @@ async def process_image(file: UploadFile = File(...)):
20
  exstyle, load_info = model.load_model('cartoon1')
21
 
22
  # Process the uploaded image
23
- aligned_face, _, input_info = model.detect_and_align_image("uploaded_image.jpg")
 
24
 
25
  # Return the processed image
26
  return FileResponse("result_image.jpg")
 
20
  exstyle, load_info = model.load_model('cartoon1')
21
 
22
  # Process the uploaded image
23
+ top, bottom, left, right = 200, 200, 200, 200 # Provide appropriate values for these parameters
24
+ aligned_face, _, input_info = model.detect_and_align_image("uploaded_image.jpg", top, bottom, left, right)
25
 
26
  # Return the processed image
27
  return FileResponse("result_image.jpg")