rbarman commited on
Commit
2365dce
·
1 Parent(s): ea854e0

return image

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -35,10 +35,11 @@ def predict(img: np.ndarray) -> str:
35
  boxes = boxes[~np.all(boxes == 0, axis=1)]
36
 
37
  result = convert_result_to_image(image, resized_image, boxes, conf_labels=False)
38
-
39
- plt.figure(figsize=(10, 6))
40
- plt.axis("off")
41
- plt.imshow(result)
 
42
 
43
 
44
  # For each detection, the description is in the [x_min, y_min, x_max, y_max, conf] format:
@@ -92,7 +93,7 @@ def convert_result_to_image(bgr_image, resized_image, boxes, threshold=0.3, conf
92
  #####
93
 
94
  title = "Text Detection"
95
- description = "Image Detection with OpenVino model"
96
  examples = ['test.jpg']
97
  interpretation='default'
98
  enable_queue=True
 
35
  boxes = boxes[~np.all(boxes == 0, axis=1)]
36
 
37
  result = convert_result_to_image(image, resized_image, boxes, conf_labels=False)
38
+
39
+ #plt.figure(figsize=(10, 6))
40
+ #plt.axis("off")
41
+ #plt.imshow(result)
42
+ return result
43
 
44
 
45
  # For each detection, the description is in the [x_min, y_min, x_max, y_max, conf] format:
 
93
  #####
94
 
95
  title = "Text Detection"
96
+ description = "Text Detection with OpenVino model"
97
  examples = ['test.jpg']
98
  interpretation='default'
99
  enable_queue=True