Spaces:
Sleeping
Sleeping
forgot to add files
Browse files- pages/2_Perform_Crop_Classification.py +6 -13
- requirements.txt +2 -1
pages/2_Perform_Crop_Classification.py
CHANGED
@@ -5,10 +5,12 @@ from folium import Icon
|
|
5 |
|
6 |
from messis.messis import Messis
|
7 |
from inference import perform_inference
|
|
|
8 |
|
9 |
-
|
10 |
|
11 |
-
|
|
|
12 |
|
13 |
# Load the model
|
14 |
@st.cache_resource
|
@@ -78,19 +80,10 @@ def perform_inference_step():
|
|
78 |
)
|
79 |
st.success("Inference completed!")
|
80 |
|
81 |
-
# GeoTIFF Satellite Imagery with selected timestep and band
|
82 |
-
# m.add_raster(
|
83 |
-
# GEOTIFF_PATH,
|
84 |
-
# layer_name="Satellite Image",
|
85 |
-
# bands=selected_bands,
|
86 |
-
# fit_bounds=True,
|
87 |
-
# vmin=vmin_vmax[selected_band][0],
|
88 |
-
# vmax=vmin_vmax[selected_band][1],
|
89 |
-
# )
|
90 |
-
|
91 |
# Add COG
|
|
|
92 |
m.add_cog_layer(
|
93 |
-
url=
|
94 |
name="Sentinel-2 Satellite Imagery",
|
95 |
bands=selected_bands,
|
96 |
rescale=f"{vmin_vmax[selected_band][0]},{vmin_vmax[selected_band][1]}",
|
|
|
5 |
|
6 |
from messis.messis import Messis
|
7 |
from inference import perform_inference
|
8 |
+
from inference import generate_presigned_url
|
9 |
|
10 |
+
from dotenv import load_dotenv
|
11 |
|
12 |
+
load_dotenv()
|
13 |
+
st.set_page_config(layout="wide")
|
14 |
|
15 |
# Load the model
|
16 |
@st.cache_resource
|
|
|
80 |
)
|
81 |
st.success("Inference completed!")
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
# Add COG
|
84 |
+
presigned_url = generate_presigned_url('messis-demo', 'stacked_features_cog.tif')
|
85 |
m.add_cog_layer(
|
86 |
+
url=presigned_url,
|
87 |
name="Sentinel-2 Satellite Imagery",
|
88 |
bands=selected_bands,
|
89 |
rescale=f"{vmin_vmax[selected_band][0]},{vmin_vmax[selected_band][1]}",
|
requirements.txt
CHANGED
@@ -20,4 +20,5 @@ numpy==1.26.4
|
|
20 |
lion-pytorch==0.2.2
|
21 |
timm==0.9.16
|
22 |
pyproj
|
23 |
-
boto3
|
|
|
|
20 |
lion-pytorch==0.2.2
|
21 |
timm==0.9.16
|
22 |
pyproj
|
23 |
+
boto3
|
24 |
+
python-dotenv
|