Nunzio commited on
Commit
c6560b4
·
1 Parent(s): a5ee0d9

added legend

Browse files
Files changed (1) hide show
  1. app.py +9 -8
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 **ID**: **name** - Color: **color**)")
81
  string = ""
82
- for i, (id, name, color) in enumerate(legendHandling()):
83
- if i and not i % 3:
84
- with gr.Row():
85
- gr.Markdown(string)
86
- string = ""
87
-
88
- string += f"**{id}**: {name} - Color: {color}"
 
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")