Spaces:
Running
on
Zero
Running
on
Zero
Martin Tomov
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -227,7 +227,7 @@ examples = [
|
|
227 |
css = """
|
228 |
#title {
|
229 |
text-align: center;
|
230 |
-
font-size:
|
231 |
margin-bottom: 20px;
|
232 |
}
|
233 |
#submit-button {
|
@@ -236,6 +236,7 @@ css = """
|
|
236 |
color: white !important;
|
237 |
font-size: 1em;
|
238 |
padding: 10px 20px;
|
|
|
239 |
}
|
240 |
.checkbox-group {
|
241 |
display: flex;
|
@@ -252,9 +253,9 @@ with gr.Blocks(css=css) as demo:
|
|
252 |
gr.Markdown("<div id='title'>InsectSAM π Detect and Segment Insects in Images - ARISE, DIOPSIS</div>")
|
253 |
with gr.Row():
|
254 |
image_input = gr.Image(type="pil")
|
255 |
-
with gr.Column(
|
256 |
-
include_json = gr.Checkbox(label="Include JSON", value=False)
|
257 |
-
include_bboxes = gr.Checkbox(label="Include Bounding Boxes", value=False)
|
258 |
submit_button = gr.Button("Submit", elem_id="submit-button")
|
259 |
|
260 |
annotated_output = gr.Image(type="numpy")
|
@@ -278,6 +279,6 @@ with gr.Blocks(css=css) as demo:
|
|
278 |
|
279 |
submit_button.click(update_outputs, [image_input, include_json, include_bboxes], [annotated_output, json_output, crops_output])
|
280 |
|
281 |
-
gr.Examples(examples=examples, inputs=image_input)
|
282 |
|
283 |
demo.launch()
|
|
|
227 |
css = """
|
228 |
#title {
|
229 |
text-align: center;
|
230 |
+
font-size: 6em;
|
231 |
margin-bottom: 20px;
|
232 |
}
|
233 |
#submit-button {
|
|
|
236 |
color: white !important;
|
237 |
font-size: 1em;
|
238 |
padding: 10px 20px;
|
239 |
+
cursor: pointer;
|
240 |
}
|
241 |
.checkbox-group {
|
242 |
display: flex;
|
|
|
253 |
gr.Markdown("<div id='title'>InsectSAM π Detect and Segment Insects in Images - ARISE, DIOPSIS</div>")
|
254 |
with gr.Row():
|
255 |
image_input = gr.Image(type="pil")
|
256 |
+
with gr.Column():
|
257 |
+
include_json = gr.Checkbox(label="Include JSON", value=False, elem_id="checkbox-group")
|
258 |
+
include_bboxes = gr.Checkbox(label="Include Bounding Boxes", value=False, elem_id="checkbox-group")
|
259 |
submit_button = gr.Button("Submit", elem_id="submit-button")
|
260 |
|
261 |
annotated_output = gr.Image(type="numpy")
|
|
|
279 |
|
280 |
submit_button.click(update_outputs, [image_input, include_json, include_bboxes], [annotated_output, json_output, crops_output])
|
281 |
|
282 |
+
gr.Examples(examples=examples, inputs=[image_input, include_json, include_bboxes])
|
283 |
|
284 |
demo.launch()
|