Dingyi6 commited on
Commit
1e82c6e
·
1 Parent(s): 87e552b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -10,8 +10,10 @@ sys.path.append(parent_dir)
10
  import ee
11
  # ee.Authenticate()
12
 
 
 
13
  # Add Google Service account credential. Authenticates to the Earth Engine servers.
14
- os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'ee-yudingyi054-64e93ae89dc1.json'
15
 
16
  if 'GOOGLE_APPLICATION_CREDENTIALS' in os.environ:
17
  print("GOOGLE_APPLICATION_CREDENTIALS set to:", os.environ['GOOGLE_APPLICATION_CREDENTIALS'])
 
10
  import ee
11
  # ee.Authenticate()
12
 
13
+ current_path = os.getcwd()
14
+ full_path = os.path.join(current_path, 'ee-yudingyi054-64e93ae89dc1.json')
15
  # Add Google Service account credential. Authenticates to the Earth Engine servers.
16
+ os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = full_path
17
 
18
  if 'GOOGLE_APPLICATION_CREDENTIALS' in os.environ:
19
  print("GOOGLE_APPLICATION_CREDENTIALS set to:", os.environ['GOOGLE_APPLICATION_CREDENTIALS'])