syedfaisalabrar commited on
Commit
8c295dd
·
verified ·
1 Parent(s): 8334105

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,7 +36,7 @@ tokenizer = AutoTokenizer.from_pretrained(
36
  )
37
 
38
 
39
- def preprocessing(image, image_size=448):
40
  """
41
  Apply enhancement filters and pad the image to match the target size while keeping full content.
42
  """
@@ -128,7 +128,7 @@ def vision_ai_api(image, doc_type):
128
 
129
  def predict(image):
130
  """Pipeline: Preprocess -> Detect -> Crop -> Vision AI API."""
131
- processed_image = dynamic_preprocess(image)
132
  rotated_image = imageRotation(processed_image) # Placeholder for rotation
133
  detected_image, labels, bounding_boxes = detect_document(rotated_image)
134
 
 
36
  )
37
 
38
 
39
+ def preprocessing(image, image_size=800):
40
  """
41
  Apply enhancement filters and pad the image to match the target size while keeping full content.
42
  """
 
128
 
129
  def predict(image):
130
  """Pipeline: Preprocess -> Detect -> Crop -> Vision AI API."""
131
+ processed_image = preprocessing(image)
132
  rotated_image = imageRotation(processed_image) # Placeholder for rotation
133
  detected_image, labels, bounding_boxes = detect_document(rotated_image)
134