Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,14 +3,6 @@ import sys
|
|
| 3 |
import time
|
| 4 |
import io
|
| 5 |
|
| 6 |
-
# Add Google Service account credential. Authenticates to the Earth Engine servers.
|
| 7 |
-
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'ee-yudingyi054-64e93ae89dc1.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)
|
|
@@ -272,6 +264,14 @@ def server(input, output, session):
|
|
| 272 |
print(f"Latitude: {lat}, Longitude: {lon}")
|
| 273 |
|
| 274 |
ui.modal_show(m)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 275 |
|
| 276 |
# Initialize Earth Engine
|
| 277 |
ee.Initialize()
|
|
|
|
| 3 |
import time
|
| 4 |
import io
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
# Add the parent directory to the Python path
|
| 7 |
parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
| 8 |
sys.path.append(parent_dir)
|
|
|
|
| 264 |
print(f"Latitude: {lat}, Longitude: {lon}")
|
| 265 |
|
| 266 |
ui.modal_show(m)
|
| 267 |
+
|
| 268 |
+
# Add Google Service account credential. Authenticates to the Earth Engine servers.
|
| 269 |
+
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'ee-yudingyi054-64e93ae89dc1.json'
|
| 270 |
+
|
| 271 |
+
if 'GOOGLE_APPLICATION_CREDENTIALS' in os.environ:
|
| 272 |
+
print("GOOGLE_APPLICATION_CREDENTIALS set to:", os.environ['GOOGLE_APPLICATION_CREDENTIALS'])
|
| 273 |
+
else:
|
| 274 |
+
print("GOOGLE_APPLICATION_CREDENTIALS is not set")
|
| 275 |
|
| 276 |
# Initialize Earth Engine
|
| 277 |
ee.Initialize()
|