updated
Browse files
app.py
CHANGED
|
@@ -19,33 +19,33 @@ def build_demo() -> gr.Blocks:
|
|
| 19 |
"画像をドロップすると自動的に処理を開始します。"
|
| 20 |
)
|
| 21 |
|
| 22 |
-
input_image = gr.Image(
|
| 23 |
-
label="入力画像",
|
| 24 |
-
type="numpy",
|
| 25 |
-
image_mode="RGB",
|
| 26 |
-
sources=["upload", "clipboard"],
|
| 27 |
-
)
|
| 28 |
-
|
| 29 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
det_gallery = gr.Gallery(
|
| 31 |
-
label="
|
| 32 |
columns=1,
|
| 33 |
object_fit="contain",
|
| 34 |
height="auto",
|
| 35 |
)
|
|
|
|
|
|
|
| 36 |
result_gallery = gr.Gallery(
|
| 37 |
-
label="
|
| 38 |
columns=1,
|
| 39 |
object_fit="contain",
|
| 40 |
height="auto",
|
| 41 |
)
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
)
|
| 49 |
|
| 50 |
input_image.change(
|
| 51 |
fn=recognize_image,
|
|
|
|
| 19 |
"画像をドロップすると自動的に処理を開始します。"
|
| 20 |
)
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
with gr.Row():
|
| 23 |
+
input_image = gr.Image(
|
| 24 |
+
label="入力画像",
|
| 25 |
+
type="numpy",
|
| 26 |
+
image_mode="RGB",
|
| 27 |
+
sources=["upload", "clipboard"],
|
| 28 |
+
)
|
| 29 |
det_gallery = gr.Gallery(
|
| 30 |
+
label="検出位置",
|
| 31 |
columns=1,
|
| 32 |
object_fit="contain",
|
| 33 |
height="auto",
|
| 34 |
)
|
| 35 |
+
|
| 36 |
+
with gr.Row():
|
| 37 |
result_gallery = gr.Gallery(
|
| 38 |
+
label="認識結果",
|
| 39 |
columns=1,
|
| 40 |
object_fit="contain",
|
| 41 |
height="auto",
|
| 42 |
)
|
| 43 |
+
result_json = gr.Textbox(
|
| 44 |
+
label="認識結果(JSON)",
|
| 45 |
+
value="[]",
|
| 46 |
+
lines=20,
|
| 47 |
+
max_lines=30,
|
| 48 |
+
)
|
|
|
|
| 49 |
|
| 50 |
input_image.change(
|
| 51 |
fn=recognize_image,
|