Spaces:
Sleeping
Sleeping
Nunzio commited on
Commit ·
c6560b4
1
Parent(s): a5ee0d9
added legend
Browse files
app.py
CHANGED
|
@@ -77,15 +77,16 @@ with gr.Blocks(title="Semantic Segmentation Predictors") as demo:
|
|
| 77 |
result_display = gr.Image(label="Model prediction", visible=True)
|
| 78 |
error_text = gr.Markdown("", visible=False)
|
| 79 |
with gr.Row():
|
| 80 |
-
gr.Markdown("The legend of the classes is the following (format **
|
| 81 |
string = ""
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
gr.
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
|
|
|
| 89 |
|
| 90 |
with gr.Row():
|
| 91 |
gr.Markdown("## Preloaded images to be used for testing the model")
|
|
|
|
| 77 |
result_display = gr.Image(label="Model prediction", visible=True)
|
| 78 |
error_text = gr.Markdown("", visible=False)
|
| 79 |
with gr.Row():
|
| 80 |
+
gr.Markdown("The legend of the classes is the following (format **name** -> **color**)")
|
| 81 |
string = ""
|
| 82 |
+
with gr.Row():
|
| 83 |
+
for i, (id, name, color) in enumerate(legendHandling()):
|
| 84 |
+
if i and not i % 2:
|
| 85 |
+
with gr.Row():
|
| 86 |
+
gr.Markdown(string)
|
| 87 |
+
string = ""
|
| 88 |
+
|
| 89 |
+
string += f"\t **{name}** -> {color}"
|
| 90 |
|
| 91 |
with gr.Row():
|
| 92 |
gr.Markdown("## Preloaded images to be used for testing the model")
|