Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -96,10 +96,18 @@ with gr.Blocks(title=title,
|
|
96 |
#
|
97 |
# gr.HTML("""<h4 style="color:navy;">1-b. Or upload an image by clicking on the canvas.</h4>""")
|
98 |
|
99 |
-
with gr.Row():
|
100 |
-
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
gr.Examples(['./d1.jpeg', './d2.jpeg', './d3.jpeg','./d4.jpeg','./d5.jpeg','./d6.jpeg'], inputs=input_image)
|
105 |
|
@@ -107,7 +115,7 @@ with gr.Blocks(title=title,
|
|
107 |
# gr.HTML("""<h4 style="color:navy;">2. Then, click "Infer" button to predict object instances. It will take about 15-20 seconds (on cpu)</h4>""")
|
108 |
|
109 |
send_btn = gr.Button("Submit")
|
110 |
-
send_btn.click(fn=inference, inputs=[
|
111 |
|
112 |
# gr.HTML("""<br/>""")
|
113 |
# gr.HTML("""<h4 style="color:navy;">Reference</h4>""")
|
|
|
96 |
#
|
97 |
# gr.HTML("""<h4 style="color:navy;">1-b. Or upload an image by clicking on the canvas.</h4>""")
|
98 |
|
99 |
+
# with gr.Row():
|
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(
|
105 |
+
# inference,
|
106 |
+
# [gr.inputs.Textbox(label="Image URL", placeholder=""),
|
107 |
+
# gr.inputs.Image(type="filepath", image_mode="RGB", source="upload", optional=False, label="Input Image"),
|
108 |
+
# gr.Slider(minimum=0.0, maximum=1.0, value=0.4, label="Minimum score"),
|
109 |
+
# ],
|
110 |
+
|
111 |
|
112 |
gr.Examples(['./d1.jpeg', './d2.jpeg', './d3.jpeg','./d4.jpeg','./d5.jpeg','./d6.jpeg'], inputs=input_image)
|
113 |
|
|
|
115 |
# gr.HTML("""<h4 style="color:navy;">2. Then, click "Infer" button to predict object instances. It will take about 15-20 seconds (on cpu)</h4>""")
|
116 |
|
117 |
send_btn = gr.Button("Submit")
|
118 |
+
send_btn.click(fn=inference, inputs=[input_url,input_image], outputs=[output_image])
|
119 |
|
120 |
# gr.HTML("""<br/>""")
|
121 |
# gr.HTML("""<h4 style="color:navy;">Reference</h4>""")
|