apailang commited on
Commit
5983968
β€’
1 Parent(s): 312651e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -40,8 +40,8 @@ def load_model(model_repo_id):
40
  def predict(pilimg,Threshold):
41
 
42
  image_np = pil_image_as_numpy_array(pilimg)
43
- if type(Threshold) is None or Threshold==0:
44
- Threshold=threshold_d
45
 
46
  return predict2(image_np,Threshold),predict3(image_np,Threshold),Threshold
47
 
@@ -144,7 +144,7 @@ b = os.path.join(os.path.dirname(__file__), "data/c_tuned_detected.mp4") # Vide
144
  # return [video1, video2]
145
 
146
  label_id_offset = 0
147
- threshold_d=0.38
148
  REPO_ID = "apailang/mytfodmodel"
149
  detection_model = load_model(REPO_ID)
150
  REPO_ID2 = "apailang/mytfodmodeltuned"
 
40
  def predict(pilimg,Threshold):
41
 
42
  image_np = pil_image_as_numpy_array(pilimg)
43
+ if type(Threshold) is None:
44
+ Threshold=0.38
45
 
46
  return predict2(image_np,Threshold),predict3(image_np,Threshold),Threshold
47
 
 
144
  # return [video1, video2]
145
 
146
  label_id_offset = 0
147
+ threshold_d= 0.38
148
  REPO_ID = "apailang/mytfodmodel"
149
  detection_model = load_model(REPO_ID)
150
  REPO_ID2 = "apailang/mytfodmodeltuned"