PolarisFTL commited on
Commit
b2e75f9
·
verified ·
1 Parent(s): 57b2194

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -78,11 +78,14 @@ with gr.Blocks() as demo:
78
  with gr.Row():
79
  with gr.Column():
80
  img_input = gr.Image(type="pil", label="Upload an Image")
 
 
 
81
  submit_btn = gr.Button("Submit")
82
  with gr.Column():
83
  output = gr.Image(type="pil", label="Prediction Result")
84
 
85
- submit_btn.click(fn=inference, inputs=[img_input, 'predict', False, True], outputs=output)
86
  demo.load(reset_interface, None, [output])
87
 
88
  with gr.Row():
@@ -92,3 +95,4 @@ with gr.Blocks() as demo:
92
  )
93
 
94
  demo.launch()
 
 
78
  with gr.Row():
79
  with gr.Column():
80
  img_input = gr.Image(type="pil", label="Upload an Image")
81
+ mode_input = gr.Radio(choices=["predict", "dir_predict"], label="Mode", value="predict")
82
+ crop_input = gr.Checkbox(value=False, label="Crop")
83
+ count_input = gr.Checkbox(value=True, label="Count")
84
  submit_btn = gr.Button("Submit")
85
  with gr.Column():
86
  output = gr.Image(type="pil", label="Prediction Result")
87
 
88
+ submit_btn.click(fn=inference, inputs=[img_input, mode_input, crop_input, count_input], outputs=output)
89
  demo.load(reset_interface, None, [output])
90
 
91
  with gr.Row():
 
95
  )
96
 
97
  demo.launch()
98
+