Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,14 +4,19 @@ import time
|
|
| 4 |
import io
|
| 5 |
|
| 6 |
# Add Google Service account credential. Authenticates to the Earth Engine servers.
|
| 7 |
-
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'grounded-nebula-392621-f192b882c364.json'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Add the parent directory to the Python path
|
| 10 |
parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
| 11 |
sys.path.append(parent_dir)
|
| 12 |
|
| 13 |
import ee
|
| 14 |
-
ee.Authenticate()
|
| 15 |
|
| 16 |
import math
|
| 17 |
from shiny import App, render, ui, reactive, Inputs, Outputs, Session
|
|
|
|
| 4 |
import io
|
| 5 |
|
| 6 |
# Add Google Service account credential. Authenticates to the Earth Engine servers.
|
| 7 |
+
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = './grounded-nebula-392621-f192b882c364.json'
|
| 8 |
+
|
| 9 |
+
if 'GOOGLE_APPLICATION_CREDENTIALS' in os.environ:
|
| 10 |
+
print("GOOGLE_APPLICATION_CREDENTIALS set to:", os.environ['GOOGLE_APPLICATION_CREDENTIALS'])
|
| 11 |
+
else:
|
| 12 |
+
print("GOOGLE_APPLICATION_CREDENTIALS is not set")
|
| 13 |
|
| 14 |
# Add the parent directory to the Python path
|
| 15 |
parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
| 16 |
sys.path.append(parent_dir)
|
| 17 |
|
| 18 |
import ee
|
| 19 |
+
# ee.Authenticate()
|
| 20 |
|
| 21 |
import math
|
| 22 |
from shiny import App, render, ui, reactive, Inputs, Outputs, Session
|