Spaces:
Runtime error
Runtime error
Guillermo Uribe Vicencio
commited on
Commit
·
d604d1b
1
Parent(s):
c004616
app.py
CHANGED
|
@@ -254,7 +254,11 @@ simple = pd.DataFrame(
|
|
| 254 |
)
|
| 255 |
|
| 256 |
with gr.Blocks() as demo:
|
| 257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 258 |
gr.Markdown(value='# Prithvi multi temporal crop classification')
|
| 259 |
gr.Markdown(value='''Prithvi is a first-of-its-kind temporal Vision transformer pretrained by the IBM and NASA team on continental US Harmonised Landsat Sentinel 2 (HLS) data. This demo showcases how the model was finetuned to classify crop and other land use categories using multi temporal data. More detailes can be found [here](https://huggingface.co/ibm-nasa-geospatial/Prithvi-100M-multi-temporal-crop-classification).\n
|
| 260 |
The user needs to provide an HLS geotiff image, including 18 bands for 3 time-step, and each time-step includes the channels described above (Blue, Green, Red, Narrow NIR, SWIR, SWIR 2) in order.
|
|
@@ -265,31 +269,30 @@ with gr.Blocks() as demo:
|
|
| 265 |
btn = gr.Button("Submit")
|
| 266 |
|
| 267 |
with gr.Column():
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
btn.click(fn=func, inputs=inp, outputs=[inp1, inp2, inp3, out])
|
| 275 |
|
| 276 |
with gr.Row():
|
| 277 |
with gr.Column():
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
x='a',
|
| 288 |
-
y='b')
|
| 289 |
-
|
| 290 |
with gr.Column():
|
| 291 |
-
gr.
|
| 292 |
-
gr.Image(value='Legend.png', image_mode='RGB', show_label=False)
|
| 293 |
-
|
|
|
|
|
|
|
|
|
|
| 294 |
|
| 295 |
-
demo.launch()
|
|
|
|
| 254 |
)
|
| 255 |
|
| 256 |
with gr.Blocks() as demo:
|
| 257 |
+
with gr.Row():
|
| 258 |
+
gr.Markdown(value='# Eclipse2')
|
| 259 |
+
gr.Button("Input")
|
| 260 |
+
gr.Button("Categories")
|
| 261 |
+
gr.Button("X")
|
| 262 |
gr.Markdown(value='# Prithvi multi temporal crop classification')
|
| 263 |
gr.Markdown(value='''Prithvi is a first-of-its-kind temporal Vision transformer pretrained by the IBM and NASA team on continental US Harmonised Landsat Sentinel 2 (HLS) data. This demo showcases how the model was finetuned to classify crop and other land use categories using multi temporal data. More detailes can be found [here](https://huggingface.co/ibm-nasa-geospatial/Prithvi-100M-multi-temporal-crop-classification).\n
|
| 264 |
The user needs to provide an HLS geotiff image, including 18 bands for 3 time-step, and each time-step includes the channels described above (Blue, Green, Red, Narrow NIR, SWIR, SWIR 2) in order.
|
|
|
|
| 269 |
btn = gr.Button("Submit")
|
| 270 |
|
| 271 |
with gr.Column():
|
| 272 |
+
with gr.Row():
|
| 273 |
+
inp1=gr.Image(image_mode='RGB', scale=10, label='T1')
|
| 274 |
+
inp2=gr.Image(image_mode='RGB', scale=10, label='T2')
|
| 275 |
+
inp3=gr.Image(image_mode='RGB', scale=10, label='T3')
|
| 276 |
+
|
|
|
|
| 277 |
btn.click(fn=func, inputs=inp, outputs=[inp1, inp2, inp3, out])
|
| 278 |
|
| 279 |
with gr.Row():
|
| 280 |
with gr.Column():
|
| 281 |
+
gr.BarPlot(simple,
|
| 282 |
+
x="a",
|
| 283 |
+
y="b",
|
| 284 |
+
title="Simple Bar Plot with made up data",
|
| 285 |
+
tooltip=["a", "b"],
|
| 286 |
+
y_lim=[20, 100],)
|
| 287 |
+
gr.LinePlot(simple,
|
| 288 |
+
x='a',
|
| 289 |
+
y='b')
|
|
|
|
|
|
|
|
|
|
| 290 |
with gr.Column():
|
| 291 |
+
out = gr.Image(image_mode='RGB', scale=10, label='Model prediction')
|
| 292 |
+
# gr.Image(value='Legend.png', image_mode='RGB', scale=2, show_label=False)
|
| 293 |
+
|
| 294 |
+
with gr.Row():
|
| 295 |
+
gr.Markdown(value='### Model prediction legend')
|
| 296 |
+
gr.Image(value='Legend.png', image_mode='RGB', show_label=False)
|
| 297 |
|
| 298 |
+
demo.launch()
|