KhadijaAsehnoune12 commited on
Commit
01f4a12
·
verified ·
1 Parent(s): 7c1ec99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -43,10 +43,16 @@ def remove_background(image):
43
 
44
  return output_image
45
 
 
 
 
 
 
 
46
  def predict(image):
47
  # Remove the background
48
  image = remove_background(image)
49
-
50
  # Preprocess the image
51
  inputs = feature_extractor(images=image, return_tensors="pt")
52
 
 
43
 
44
  return output_image
45
 
46
+ def enhance_details(image):
47
+ # Apply a sharpening filter to enhance details
48
+ enhanced_image = image.filter(ImageFilter.SHARPEN)
49
+
50
+ return enhanced_imag
51
+
52
  def predict(image):
53
  # Remove the background
54
  image = remove_background(image)
55
+ image = enhance_details(image)
56
  # Preprocess the image
57
  inputs = feature_extractor(images=image, return_tensors="pt")
58