Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -96,8 +96,9 @@ with gr.Blocks(title=title,
|
|
96 |
gr.HTML("""<h5 style="color:navy;">2- Or upload an image by clicking on the canvas.</h5>""")
|
97 |
|
98 |
with gr.Row():
|
99 |
-
|
100 |
-
|
|
|
101 |
output_image = gr.Image(type="pil", label="Output")
|
102 |
|
103 |
# gr.Interface(
|
@@ -110,20 +111,20 @@ with gr.Blocks(title=title,
|
|
110 |
|
111 |
gr.Examples(['./d1.jpeg', './d2.jpeg', './d3.jpeg','./d4.jpeg','./d5.jpeg','./d6.jpeg'], inputs=input_image)
|
112 |
|
113 |
-
gr.HTML("""<br/>""")
|
114 |
-
gr.HTML("""<h5 style="color:navy;">3- Then, click "Submit" button to predict object instances. It will take about 15-20 seconds (on cpu)</h5>""")
|
115 |
|
116 |
-
send_btn = gr.Button("Submit")
|
117 |
|
118 |
-
gr.HTML("""<h5 style="color:navy;">You can use this slider to control boxes min score: </h5>""")
|
119 |
|
120 |
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])
|
121 |
|
122 |
-
gr.HTML("""<
|
123 |
-
gr.
|
124 |
-
|
125 |
-
gr.HTML("""<
|
126 |
-
gr.HTML("""
|
|
|
|
|
127 |
|
128 |
|
129 |
#demo.queue()
|
|
|
96 |
gr.HTML("""<h5 style="color:navy;">2- Or upload an image by clicking on the canvas.</h5>""")
|
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(
|
|
|
111 |
|
112 |
gr.Examples(['./d1.jpeg', './d2.jpeg', './d3.jpeg','./d4.jpeg','./d5.jpeg','./d6.jpeg'], inputs=input_image)
|
113 |
|
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 |
+
gr.HTML("""<h5 style="color:navy;">4- Then, click "Submit" button to predict object instances. It will take about 15-20 seconds (on cpu)</h5>""")
|
122 |
+
send_btn = gr.Button("Submit")
|
123 |
+
|
124 |
+
#gr.HTML("""<h5 style="color:navy;">Reference</h5>""")
|
125 |
+
#gr.HTML("""<ul>""")
|
126 |
+
gr.HTML("""<p>Detectron model is available from our repository <a href="https://github.com/asalhi/Smartathon-Baseer">here</a>.</p>""")
|
127 |
+
#gr.HTML("""</ul>""")
|
128 |
|
129 |
|
130 |
#demo.queue()
|