Spaces:
Sleeping
Sleeping
ignaziogallo
commited on
Commit
·
5803fc9
1
Parent(s):
3c2c5b7
resolved bug of zip uploading
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ import matplotlib.pyplot as plt
|
|
6 |
import matplotlib.animation as animation
|
7 |
import streamlit.components.v1 as components
|
8 |
from matplotlib import colors
|
|
|
9 |
|
10 |
st.set_page_config(layout="wide")
|
11 |
|
@@ -286,13 +287,14 @@ if st.paths is not None:
|
|
286 |
anim_src = load_src_images_as_animations(img_full_paths, pred_dates)
|
287 |
components.html(anim_src.to_jshtml(), height=600)
|
288 |
|
289 |
-
|
|
|
290 |
## Lombardia Dataset
|
291 |
You can download other patches from the original dataset created and published on
|
292 |
[Kaggle](https://www.kaggle.com/datasets/ignazio/sentinel2-crop-mapping) and used in our paper.
|
293 |
|
294 |
## How to build an input file for the Demo
|
295 |
-
You can download this [example zip](
|
296 |
how to create a new sample to feed as input to the model. A sample is a time series of sentinel-2 images,
|
297 |
i.e. all images acquired by the satellite during a year.
|
298 |
A zip file must contain
|
|
|
6 |
import matplotlib.animation as animation
|
7 |
import streamlit.components.v1 as components
|
8 |
from matplotlib import colors
|
9 |
+
from huggingface_hub import hf_hub_url
|
10 |
|
11 |
st.set_page_config(layout="wide")
|
12 |
|
|
|
287 |
anim_src = load_src_images_as_animations(img_full_paths, pred_dates)
|
288 |
components.html(anim_src.to_jshtml(), height=600)
|
289 |
|
290 |
+
zip_url = hf_hub_url(repo_id="ARTeLab/DemoCropMapping", filename="demo_data/1509.zip")
|
291 |
+
st.markdown(f"""
|
292 |
## Lombardia Dataset
|
293 |
You can download other patches from the original dataset created and published on
|
294 |
[Kaggle](https://www.kaggle.com/datasets/ignazio/sentinel2-crop-mapping) and used in our paper.
|
295 |
|
296 |
## How to build an input file for the Demo
|
297 |
+
You can download this [example zip]({zip_url}) to understand
|
298 |
how to create a new sample to feed as input to the model. A sample is a time series of sentinel-2 images,
|
299 |
i.e. all images acquired by the satellite during a year.
|
300 |
A zip file must contain
|