Spaces:
Runtime error
Runtime error
Update deforestation_percenatge_image_api.py
Browse files
deforestation_percenatge_image_api.py
CHANGED
|
@@ -32,6 +32,11 @@ app.add_middleware(
|
|
| 32 |
clf = joblib.load('./deforestation_percentage_model_intel_1.joblib')
|
| 33 |
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
config = SHConfig()
|
| 36 |
config.sh_client_id ='a14c2ad8-e87d-42c4-be03-44d993bd8729'
|
| 37 |
# os.getenv('SENTINENTAL_ID')
|
|
|
|
| 32 |
clf = joblib.load('./deforestation_percentage_model_intel_1.joblib')
|
| 33 |
|
| 34 |
|
| 35 |
+
|
| 36 |
+
# Set the config directory to a writable location
|
| 37 |
+
config_dir = '/app/.config/sentinelhub'
|
| 38 |
+
os.makedirs(config_dir, exist_ok=True) # Create the directory if it doesn't exist
|
| 39 |
+
os.environ['SENTINELHUB_CONFIG'] = config_dir # Set the environment variable for the config path
|
| 40 |
config = SHConfig()
|
| 41 |
config.sh_client_id ='a14c2ad8-e87d-42c4-be03-44d993bd8729'
|
| 42 |
# os.getenv('SENTINENTAL_ID')
|