arsh1101 commited on
Commit
51bf7a2
·
verified ·
1 Parent(s): bb6e7fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -23,8 +23,8 @@ from sentinelhub import SHConfig
23
  # config = SHConfig(config_location=CONFIG_FILE)
24
  config = SHConfig(
25
  use_defaults=True,
26
- sh_client_id=os.getenv("6d0ce745-30fd-4477-8c87-6e8e546bdd86"),
27
- sh_client_secret=os.getenv("W8wWEIwevW45XFsw3cDGq0cszcYgbsnj")
28
  )
29
 
30
  app = FastAPI()
@@ -51,16 +51,16 @@ clf = joblib.load('./deforestation_percentage_model.joblib')
51
 
52
 
53
 
54
- print("Using config dir:", os.getenv("SENTINELHUB_CONFIG_FOLDER"))
55
 
56
 
57
- CONFIG_PATH = "/app/.config/sentinelhub/config.json"
58
- os.makedirs(os.path.dirname(CONFIG_PATH), exist_ok=True)
59
 
60
- # Use a custom config location
61
- config = SHConfig(config_location=CONFIG_PATH)
62
- config.sh_client_id =os.getenv('SENTINENTAL_ID')
63
- config.sh_client_secret =os.getenv('SENTINENTAL_PASS')
64
 
65
 
66
  class DeforestationRequest(BaseModel):
 
23
  # config = SHConfig(config_location=CONFIG_FILE)
24
  config = SHConfig(
25
  use_defaults=True,
26
+ sh_client_id=os.getenv("id"),
27
+ sh_client_secret=os.getenv("secret")
28
  )
29
 
30
  app = FastAPI()
 
51
 
52
 
53
 
54
+ # print("Using config dir:", os.getenv("SENTINELHUB_CONFIG_FOLDER"))
55
 
56
 
57
+ # CONFIG_PATH = "/app/.config/sentinelhub/config.json"
58
+ # os.makedirs(os.path.dirname(CONFIG_PATH), exist_ok=True)
59
 
60
+ # # Use a custom config location
61
+ # config = SHConfig(config_location=CONFIG_PATH)
62
+ # config.sh_client_id =os.getenv('SENTINENTAL_ID')
63
+ # config.sh_client_secret =os.getenv('SENTINENTAL_PASS')
64
 
65
 
66
  class DeforestationRequest(BaseModel):