Spaces:
Sleeping
Sleeping
Nunzio commited on
Commit ·
e661224
1
Parent(s): 513f08d
added color
Browse files
app.py
CHANGED
|
@@ -86,14 +86,14 @@ with gr.Blocks(title="Semantic Segmentation Predictors") as demo:
|
|
| 86 |
with gr.Column(scale=1):
|
| 87 |
color_box0 = f"""<span style='display:inline-block; width:15px; height:15px;
|
| 88 |
background-color:rgb({legend[i][1][0]},{legend[i][1][1]},{legend[i][1][2]}); margin-left:6px; border:1px solid #000;'></span>"""
|
| 89 |
-
gr.
|
| 90 |
with gr.Column(scale=1):
|
| 91 |
if i + 1 < len(legend):
|
| 92 |
color_box1 = f"""<span style='display:inline-block; width:15px; height:15px;
|
| 93 |
background-color:rgb({legend[i+1][1][0]},{legend[i+1][1][1]},{legend[i+1][1][2]}); margin-left:6px; border:1px solid #000;'></span>"""
|
| 94 |
-
gr.
|
| 95 |
else:
|
| 96 |
-
gr.
|
| 97 |
|
| 98 |
|
| 99 |
with gr.Row():
|
|
@@ -115,7 +115,7 @@ with gr.Blocks(title="Semantic Segmentation Predictors") as demo:
|
|
| 115 |
outputs=[result_display, error_text],
|
| 116 |
)
|
| 117 |
|
| 118 |
-
gr.Markdown("Made by group 21 semantic segmentation project at Politecnico di Torino 2024
|
| 119 |
|
| 120 |
demo.launch()
|
| 121 |
|
|
|
|
| 86 |
with gr.Column(scale=1):
|
| 87 |
color_box0 = f"""<span style='display:inline-block; width:15px; height:15px;
|
| 88 |
background-color:rgb({legend[i][1][0]},{legend[i][1][1]},{legend[i][1][2]}); margin-left:6px; border:1px solid #000;'></span>"""
|
| 89 |
+
gr.HTML(f"**{legend[i][1]}** → {legend[i][2]} {color_box0}")
|
| 90 |
with gr.Column(scale=1):
|
| 91 |
if i + 1 < len(legend):
|
| 92 |
color_box1 = f"""<span style='display:inline-block; width:15px; height:15px;
|
| 93 |
background-color:rgb({legend[i+1][1][0]},{legend[i+1][1][1]},{legend[i+1][1][2]}); margin-left:6px; border:1px solid #000;'></span>"""
|
| 94 |
+
gr.HTML(f"**{legend[i+1][1]}** → {legend[i+1][2]} {color_box1}")
|
| 95 |
else:
|
| 96 |
+
gr.HTML("") # Keeps spacing consistent if list is odd
|
| 97 |
|
| 98 |
|
| 99 |
with gr.Row():
|
|
|
|
| 115 |
outputs=[result_display, error_text],
|
| 116 |
)
|
| 117 |
|
| 118 |
+
gr.Markdown("Made by group 21 semantic segmentation project at Politecnico di Torino 2024/2025")
|
| 119 |
|
| 120 |
demo.launch()
|
| 121 |
|