Update app.py
Browse files
app.py
CHANGED
|
@@ -20,15 +20,15 @@ from datetime import datetime, timedelta
|
|
| 20 |
import rasterio
|
| 21 |
from rasterio.transform import xy
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
|
|
|
| 25 |
|
| 26 |
try:
|
| 27 |
-
#
|
| 28 |
-
|
| 29 |
-
ee.Initialize(credentials, project='your-project-id') # Replace with your actual project ID
|
| 30 |
except Exception as e:
|
| 31 |
-
print(f"Error initializing
|
| 32 |
|
| 33 |
# Define crop season dictionary
|
| 34 |
crop_season_dict = {
|
|
|
|
| 20 |
import rasterio
|
| 21 |
from rasterio.transform import xy
|
| 22 |
|
| 23 |
+
|
| 24 |
+
# Tell Earth Engine to use your local credentials file
|
| 25 |
+
os.environ['EARTHENGINE_TOKEN'] = 'credentials' # relative path or use full path if needed
|
| 26 |
|
| 27 |
try:
|
| 28 |
+
ee.Initialize(project='artful-striker-466710-b3') # Replace with your actual GEE project ID
|
| 29 |
+
print("Earth Engine initialized successfully.")
|
|
|
|
| 30 |
except Exception as e:
|
| 31 |
+
print(f"Error initializing Earth Engine: {e}")
|
| 32 |
|
| 33 |
# Define crop season dictionary
|
| 34 |
crop_season_dict = {
|