ammariii08 commited on
Commit
b87650f
·
verified ·
1 Parent(s): 441524e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -452,9 +452,9 @@ def predict(
452
  # Apply sharpness enhancement.
453
  if isinstance(image, np.ndarray):
454
  pil_image = Image.fromarray(image)
455
- enhanced_image = ImageEnhance.Sharpness(pil_image).enhance(0.5)
456
- contrast_enhanced = ImageEnhance.Brightness(pil_image).enhance(1)
457
- image = np.array(contrast_enhanced)
458
 
459
  # ---------------------
460
  # 1) Detect the drawer with YOLOWorld
 
452
  # Apply sharpness enhancement.
453
  if isinstance(image, np.ndarray):
454
  pil_image = Image.fromarray(image)
455
+ Bright = ImageEnhance.Brightness(pil_image).enhance(0.5)
456
+ enhanced_image = ImageEnhance.Sharpness(Bright).enhance(0.5)
457
+ image = np.array(enhanced_image)
458
 
459
  # ---------------------
460
  # 1) Detect the drawer with YOLOWorld