apailang commited on
Commit
5791824
Β·
1 Parent(s): 5bb43e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -172,14 +172,15 @@ test12 = os.path.join(os.path.dirname(__file__), "data/test12.jpeg")
172
  base_image = gr.Interface(
173
  fn=predict,
174
  # inputs=[gr.Image(type="pil"),gr.Slider(minimum=0.01, maximum=1, value=0.38 ,label="Threshold",info="[not in used]to set prediction confidence threshold")],
175
- inputs=[gr.Image(type="pil"),gr.Textbox(value=0.38 ,label="Change default 0.38 Threshold",info="to set prediction confidence threshold")],
176
 
177
  outputs=[gr.Image(type="pil",label="Base Model Inference"),gr.Image(type="pil",label="Tuned Model Inference"),gr.Textbox(label="Tuned Model Inference")],
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(
185
  # fn=predict3,
 
172
  base_image = gr.Interface(
173
  fn=predict,
174
  # inputs=[gr.Image(type="pil"),gr.Slider(minimum=0.01, maximum=1, value=0.38 ,label="Threshold",info="[not in used]to set prediction confidence threshold")],
175
+ inputs=[gr.Image(type="pil"),gr.Textbox(value=0.38 ,label="To change default 0.38 Threshold",info="to set prediction confidence threshold")],
176
 
177
  outputs=[gr.Image(type="pil",label="Base Model Inference"),gr.Image(type="pil",label="Tuned Model Inference"),gr.Textbox(label="Tuned Model Inference")],
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=gr.Examples(
181
+ [[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],],
182
+ cache_examples=True,examples_per_page=12,label="select image with 0.38 threshold to inference, you may amend threshold after inference")
183
+ )
184
 
185
  # tuned_image = gr.Interface(
186
  # fn=predict3,