Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,11 +16,18 @@ from keras import backend as K
|
|
| 16 |
from keras.models import load_model
|
| 17 |
|
| 18 |
# Replace 'your_username' and 'your_model_name' with the appropriate values
|
|
|
|
|
|
|
| 19 |
model_identifier = "Chancee12/satellite_segmentation_v3_full"
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
# The rest of
|
| 24 |
|
| 25 |
class_building = '#2A2A2A'
|
| 26 |
class_building = class_building.lstrip('#')
|
|
|
|
| 16 |
from keras.models import load_model
|
| 17 |
|
| 18 |
# Replace 'your_username' and 'your_model_name' with the appropriate values
|
| 19 |
+
import zipfile
|
| 20 |
+
|
| 21 |
model_identifier = "Chancee12/satellite_segmentation_v3_full"
|
| 22 |
+
filename = "satellite_segmentation_v3_full.zip"
|
| 23 |
+
model_directory = hf_hub_download(repo_id=model_identifier, filename=filename, repo_type="model")
|
| 24 |
+
|
| 25 |
+
# Extract the zip file
|
| 26 |
+
with zipfile.ZipFile(model_directory, 'r') as zip_ref:
|
| 27 |
+
zip_ref.extractall("satellite_segmentation_v3_full")
|
| 28 |
+
|
| 29 |
|
| 30 |
+
# The rest of code remains the same
|
| 31 |
|
| 32 |
class_building = '#2A2A2A'
|
| 33 |
class_building = class_building.lstrip('#')
|