johnlockejrr commited on
Commit
4d40b14
·
verified ·
1 Parent(s): e59fb5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -40,7 +40,7 @@ def get_width(image, height=DEFAULT_HEIGHT):
40
  return height * aspect_ratio
41
 
42
  def predict(model_name, input_img):
43
- model_dir = 'pylaia-mcdonald_v2'
44
  temperature = 2.0
45
  batch_size = 1
46
 
@@ -118,7 +118,7 @@ def process_image(image):
118
  crop_pil = Image.fromarray(cv2.cvtColor(crop_img, cv2.COLOR_BGR2RGB))
119
 
120
  # Recognize text using PyLaia model
121
- predicted = predict('johnlockejrr/pylaia-samaritan_v1', crop_pil)
122
  texts.append(predicted[1]["text"])
123
 
124
  bboxes.append((x1, y1, x2, y2))
 
40
  return height * aspect_ratio
41
 
42
  def predict(model_name, input_img):
43
+ model_dir = 'pylaia-samaritan_v1'
44
  temperature = 2.0
45
  batch_size = 1
46
 
 
118
  crop_pil = Image.fromarray(cv2.cvtColor(crop_img, cv2.COLOR_BGR2RGB))
119
 
120
  # Recognize text using PyLaia model
121
+ predicted = predict('pylaia-samaritan_v1', crop_pil)
122
  texts.append(predicted[1]["text"])
123
 
124
  bboxes.append((x1, y1, x2, y2))