Commit
·
d05911d
1
Parent(s):
0a4bd27
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,8 +30,8 @@ def snap(image, model, conf):
|
|
| 30 |
# Get the labels
|
| 31 |
labels = results.pandas().xyxy[0]["name"].values
|
| 32 |
|
| 33 |
-
# Sort the labels by their x-value
|
| 34 |
-
labels
|
| 35 |
|
| 36 |
return [resulting_image, labels]
|
| 37 |
|
|
@@ -39,7 +39,7 @@ def snap(image, model, conf):
|
|
| 39 |
demo = gr.Interface(
|
| 40 |
snap,
|
| 41 |
[gr.Image(source="webcam", tool=None, streaming=True), gr.inputs.Radio(["M-Raw", "N-Raw", "S-Raw"]), gr.inputs.Slider(0.0, 1.0, 0.5, 0.1, "Confidence")],
|
| 42 |
-
["image", "
|
| 43 |
title="Baybayin Instance Detection"
|
| 44 |
)
|
| 45 |
|
|
|
|
| 30 |
# Get the labels
|
| 31 |
labels = results.pandas().xyxy[0]["name"].values
|
| 32 |
|
| 33 |
+
# Sort the labels by their x-value first and then by their y-value
|
| 34 |
+
print(labels)
|
| 35 |
|
| 36 |
return [resulting_image, labels]
|
| 37 |
|
|
|
|
| 39 |
demo = gr.Interface(
|
| 40 |
snap,
|
| 41 |
[gr.Image(source="webcam", tool=None, streaming=True), gr.inputs.Radio(["M-Raw", "N-Raw", "S-Raw"]), gr.inputs.Slider(0.0, 1.0, 0.5, 0.1, "Confidence")],
|
| 42 |
+
["image", "text"],
|
| 43 |
title="Baybayin Instance Detection"
|
| 44 |
)
|
| 45 |
|