Spaces:
Sleeping
Sleeping
Guillermo Uribe Vicencio
commited on
Commit
·
65d3323
1
Parent(s):
637e7be
app.py
CHANGED
@@ -57,7 +57,7 @@ cdl_color_map = [{'value': 1, 'label': 'Natural vegetation', 'rgb': (233,255,190
|
|
57 |
{'value': 12, 'label': 'Sorghum', 'rgb':(255,158,15), 'qtt': 0},
|
58 |
{'value': 13, 'label': 'Other', 'rgb':(0,175,77), 'qtt': 0}]
|
59 |
|
60 |
-
def apply_color_map(rgb, color_map, map_resume):
|
61 |
|
62 |
rgb_mapped = rgb.copy()
|
63 |
|
@@ -271,15 +271,16 @@ with gr.Blocks() as demo:
|
|
271 |
inp3=gr.Image(image_mode='RGB', scale=10, label='T3')
|
272 |
|
273 |
with gr.Row():
|
274 |
-
|
275 |
-
gr.
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
|
|
283 |
with gr.Column():
|
284 |
out = gr.Image(image_mode='RGB', scale=10, label='Model prediction')
|
285 |
# gr.Image(value='Legend.png', image_mode='RGB', scale=2, show_label=False)
|
|
|
57 |
{'value': 12, 'label': 'Sorghum', 'rgb':(255,158,15), 'qtt': 0},
|
58 |
{'value': 13, 'label': 'Other', 'rgb':(0,175,77), 'qtt': 0}]
|
59 |
|
60 |
+
def apply_color_map(rgb, color_map=cdl_color_map, map_resume=map_resume):
|
61 |
|
62 |
rgb_mapped = rgb.copy()
|
63 |
|
|
|
271 |
inp3=gr.Image(image_mode='RGB', scale=10, label='T3')
|
272 |
|
273 |
with gr.Row():
|
274 |
+
if len(map_resume) > 1:
|
275 |
+
with gr.Column():
|
276 |
+
gr.BarPlot(bar_data,
|
277 |
+
x="label",
|
278 |
+
y="qtt",
|
279 |
+
title="Simple Bar Plot with made up data",
|
280 |
+
tooltip=["label", "qtt"])
|
281 |
+
gr.LinePlot(bar_data,
|
282 |
+
x='label',
|
283 |
+
y='qtt')
|
284 |
with gr.Column():
|
285 |
out = gr.Image(image_mode='RGB', scale=10, label='Model prediction')
|
286 |
# gr.Image(value='Legend.png', image_mode='RGB', scale=2, show_label=False)
|