update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
import json
|
|
|
|
|
3 |
|
4 |
|
5 |
st.set_page_config(layout="wide")
|
@@ -14,13 +16,15 @@ div.stButton > button:first-child {
|
|
14 |
unsafe_allow_html=True,
|
15 |
)
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
21 |
|
22 |
-
|
23 |
-
ee.Initialize()
|
24 |
|
25 |
# Load JSON data for Sentinel dataset options
|
26 |
with open("sentinel_datasets.json") as f:
|
|
|
1 |
import streamlit as st
|
2 |
import json
|
3 |
+
import ee
|
4 |
+
import geemap
|
5 |
|
6 |
|
7 |
st.set_page_config(layout="wide")
|
|
|
16 |
unsafe_allow_html=True,
|
17 |
)
|
18 |
|
19 |
+
# Authenticate and initialize Earth Engine
|
20 |
+
earthengine_credentials = os.environ.get("EE_Authentication")
|
21 |
+
|
22 |
+
# Initialize Earth Engine with the secret credentials
|
23 |
+
os.makedirs(os.path.expanduser("~/.config/earthengine/"), exist_ok=True)
|
24 |
+
with open(os.path.expanduser("~/.config/earthengine/credentials"), "w") as f:
|
25 |
+
f.write(earthengine_credentials)
|
26 |
|
27 |
+
ee.Initialize(project='ee-yashsacisro24')
|
|
|
28 |
|
29 |
# Load JSON data for Sentinel dataset options
|
30 |
with open("sentinel_datasets.json") as f:
|