apailang commited on
Commit
e4231ee
Β·
1 Parent(s): 61df7bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -40,7 +40,7 @@ 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 NoneType:
44
  Threshold=0.38
45
 
46
  return predict2(image_np),predict3(image_np),Threshold
@@ -178,7 +178,7 @@ base_image = gr.Interface(
178
  title="Luffy and Chopper Head detection. SSD mobile net V2 320x320",
179
  description="Upload a Image for prediction or click on below examples. Prediction confident >38% will be shown in dectected images. Threshold slider is WIP",
180
  examples=[[test1,0.38],[test2,0.38],[test3,0.38],[test4,0.38],[test5,0.38],[test6,0.38],[test7,0.38],[test8,0.38],[test9,0.38],[test10,0.38],[test11,0.38],[test12,0.38],],
181
- cache_examples=True,examples_per_page=12
182
  )#.launch(share=True)
183
 
184
  # tuned_image = gr.Interface(
 
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),predict3(image_np),Threshold
 
178
  title="Luffy and Chopper Head detection. SSD mobile net V2 320x320",
179
  description="Upload a Image for prediction or click on below examples. Prediction confident >38% will be shown in dectected images. Threshold slider is WIP",
180
  examples=[[test1,0.38],[test2,0.38],[test3,0.38],[test4,0.38],[test5,0.38],[test6,0.38],[test7,0.38],[test8,0.38],[test9,0.38],[test10,0.38],[test11,0.38],[test12,0.38],],
181
+ cache_examples=True,examples_per_page=12,Label="select images with 0.38 threshold, you may amend threshold after selecting the image"
182
  )#.launch(share=True)
183
 
184
  # tuned_image = gr.Interface(