Spaces:
Sleeping
Sleeping
Nunzio commited on
Commit ·
87e9613
1
Parent(s): c6560b4
new layout
Browse files
app.py
CHANGED
|
@@ -76,17 +76,17 @@ with gr.Blocks(title="Semantic Segmentation Predictors") as demo:
|
|
| 76 |
with gr.Column():
|
| 77 |
result_display = gr.Image(label="Model prediction", visible=True)
|
| 78 |
error_text = gr.Markdown("", visible=False)
|
|
|
|
| 79 |
with gr.Row():
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
if i
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
string += f"\t **{name}** -> {color}"
|
| 90 |
|
| 91 |
with gr.Row():
|
| 92 |
gr.Markdown("## Preloaded images to be used for testing the model")
|
|
|
|
| 76 |
with gr.Column():
|
| 77 |
result_display = gr.Image(label="Model prediction", visible=True)
|
| 78 |
error_text = gr.Markdown("", visible=False)
|
| 79 |
+
gr.Markdown("The legend of the classes is the following (format **name** -> **color**)")
|
| 80 |
with gr.Row():
|
| 81 |
+
for i in range(0, len(legendHandling()), 2):
|
| 82 |
+
with gr.Row():
|
| 83 |
+
gr.Markdown(f"**{legendHandling()[i][1]}** → {legendHandling()[i][2]}")
|
| 84 |
+
|
| 85 |
+
if i + 1 < len(legendHandling()):
|
| 86 |
+
gr.Markdown(f"**{legendHandling()[i + 1][1]}** → {legendHandling()[i + 1][2]}")
|
| 87 |
+
else:
|
| 88 |
+
gr.Markdown("") # Fills the second column if odd number of items
|
| 89 |
+
|
|
|
|
| 90 |
|
| 91 |
with gr.Row():
|
| 92 |
gr.Markdown("## Preloaded images to be used for testing the model")
|