apailang commited on
Commit
480ce71
β€’
1 Parent(s): ad7889a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -41,9 +41,9 @@ def predict(pilimg,Threshold):
41
 
42
  image_np = pil_image_as_numpy_array(pilimg)
43
  if type(Threshold) is None:
44
- Threshold=threshold_d.astype(int)
45
 
46
- return predict2(image_np,Threshold),predict3(image_np,Threshold),Threshold.astype(int)
47
 
48
  def predict2(image_np,Threshold):
49
 
@@ -69,7 +69,7 @@ def predict2(image_np,Threshold):
69
 
70
  result_pil_img2 = tf.keras.utils.array_to_img(image_np_with_detections[0])
71
 
72
- return result_pil_img2,Threshold
73
 
74
 
75
  def predict3(image_np,Threshold):
@@ -96,7 +96,7 @@ def predict3(image_np,Threshold):
96
 
97
  result_pil_img4 = tf.keras.utils.array_to_img(image_np_with_detections[0])
98
 
99
- return result_pil_img4,Threshold
100
 
101
  # def detect_video(video):
102
  # # Create a video capture object
 
41
 
42
  image_np = pil_image_as_numpy_array(pilimg)
43
  if type(Threshold) is None:
44
+ Threshold=threshold_d
45
 
46
+ return predict2(image_np,Threshold),predict3(image_np,Threshold),Threshold
47
 
48
  def predict2(image_np,Threshold):
49
 
 
69
 
70
  result_pil_img2 = tf.keras.utils.array_to_img(image_np_with_detections[0])
71
 
72
+ return result_pil_img2
73
 
74
 
75
  def predict3(image_np,Threshold):
 
96
 
97
  result_pil_img4 = tf.keras.utils.array_to_img(image_np_with_detections[0])
98
 
99
+ return result_pil_img4
100
 
101
  # def detect_video(video):
102
  # # Create a video capture object