SohomToom commited on
Commit
34ea16a
·
verified ·
1 Parent(s): 8149dd9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -42,7 +42,7 @@ def sample_border_color(image, box, padding=2):
42
  median_color = np.median(border_pixels, axis=0)
43
  return tuple(map(int, median_color))
44
 
45
- @spaces.GPU
46
  def detect_text_boxes(image):
47
  results = ocr.ocr(image, cls=True)
48
  boxes = []
@@ -104,6 +104,7 @@ def remove_text_dynamic_fill(img_path, output_path):
104
  image = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
105
  cv2.imwrite(output_path, image)
106
 
 
107
  def process_folder(input_files):
108
  temp_output = tempfile.mkdtemp()
109
 
 
42
  median_color = np.median(border_pixels, axis=0)
43
  return tuple(map(int, median_color))
44
 
45
+
46
  def detect_text_boxes(image):
47
  results = ocr.ocr(image, cls=True)
48
  boxes = []
 
104
  image = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
105
  cv2.imwrite(output_path, image)
106
 
107
+ @spaces.GPU
108
  def process_folder(input_files):
109
  temp_output = tempfile.mkdtemp()
110