Ashrafb commited on
Commit
3d946cf
·
verified ·
1 Parent(s): cd7dbbf

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -35,7 +35,7 @@ async def process_image(file: UploadFile = File(...), top: int = Form(...), bott
35
 
36
  # Process the uploaded image
37
  aligned_face, instyle, message = model.detect_and_align_image(self,"uploaded_image.jpg", top, bottom, left, right)
38
- processed_image, message = model.image_toonify(aligned_face, instyle, model.exstyle, style_degree=0.5, style_type='cartoon1')
39
 
40
  # Convert processed image to bytes
41
  image_bytes = cv2.imencode('.jpg', processed_image)[1].tobytes()
 
35
 
36
  # Process the uploaded image
37
  aligned_face, instyle, message = model.detect_and_align_image(self,"uploaded_image.jpg", top, bottom, left, right)
38
+ processed_image, message = model.image_toonify(self,aligned_face, instyle, model.exstyle, style_degree=0.5, style_type='cartoon1')
39
 
40
  # Convert processed image to bytes
41
  image_bytes = cv2.imencode('.jpg', processed_image)[1].tobytes()