Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -93,12 +93,15 @@ with gr.Blocks(title=title,
|
|
93 |
#
|
94 |
gr.HTML("""<h5 style="color:navy;">1- Select an example by clicking a thumbnail below.</h5>""")
|
95 |
#
|
96 |
-
gr.HTML("""<h5 style="color:navy;">2- Or upload an image by clicking on the canvas
|
|
|
97 |
|
98 |
with gr.Row():
|
99 |
with gr.Column():
|
100 |
input_url = gr.Textbox(label="Image URL", placeholder="")
|
101 |
input_image = gr.Image(type="filepath", image_mode="RGB", source="upload", optional=False, label="Input Image")
|
|
|
|
|
102 |
output_image = gr.Image(type="pil", label="Output")
|
103 |
|
104 |
# gr.Interface(
|
@@ -114,12 +117,12 @@ with gr.Blocks(title=title,
|
|
114 |
#gr.HTML("""<br/>""")
|
115 |
|
116 |
|
117 |
-
gr.HTML("""<h5 style="color:navy;">3- You can use this slider to control boxes min score: </h5>""")
|
118 |
|
119 |
-
send_btn.click(fn=inference, inputs=[input_url,input_image,gr.Slider(minimum=0.0, maximum=1.0, value=0.4, label="Minimum score")], outputs=[output_image])
|
120 |
|
121 |
-
|
|
|
122 |
send_btn = gr.Button("Submit")
|
|
|
123 |
|
124 |
#gr.HTML("""<h5 style="color:navy;">Reference</h5>""")
|
125 |
#gr.HTML("""<ul>""")
|
|
|
93 |
#
|
94 |
gr.HTML("""<h5 style="color:navy;">1- Select an example by clicking a thumbnail below.</h5>""")
|
95 |
#
|
96 |
+
gr.HTML("""<h5 style="color:navy;">2- Or upload an image by clicking on the canvas.<br>
|
97 |
+
3- Or insert direct url of an image.</h5>""")
|
98 |
|
99 |
with gr.Row():
|
100 |
with gr.Column():
|
101 |
input_url = gr.Textbox(label="Image URL", placeholder="")
|
102 |
input_image = gr.Image(type="filepath", image_mode="RGB", source="upload", optional=False, label="Input Image")
|
103 |
+
gr.HTML("""<h5 style="color:navy;">4- You can use this slider to control boxes min score: </h5>""")
|
104 |
+
sliderr = gr.Slider(minimum=0.0, maximum=1.0, value=0.4, label="Minimum score")
|
105 |
output_image = gr.Image(type="pil", label="Output")
|
106 |
|
107 |
# gr.Interface(
|
|
|
117 |
#gr.HTML("""<br/>""")
|
118 |
|
119 |
|
|
|
120 |
|
|
|
121 |
|
122 |
+
|
123 |
+
gr.HTML("""<h5 style="color:navy;">5- Then, click "Submit" button to predict object instances. It will take about 15-20 seconds (on cpu)</h5>""")
|
124 |
send_btn = gr.Button("Submit")
|
125 |
+
send_btn.click(fn=inference, inputs=[input_url,input_image,sliderr], outputs=[output_image])
|
126 |
|
127 |
#gr.HTML("""<h5 style="color:navy;">Reference</h5>""")
|
128 |
#gr.HTML("""<ul>""")
|