Update app.py
Browse files
app.py
CHANGED
@@ -9,8 +9,12 @@ model_path = 'dhhd255/main_model/best_model.h5'
|
|
9 |
with fs.open(model_path, 'rb') as f:
|
10 |
model_content = f.read()
|
11 |
|
|
|
|
|
|
|
|
|
12 |
# Load your custom model
|
13 |
-
model = keras.models.load_model(
|
14 |
|
15 |
# Define a function that takes an image as input and uses the model for inference
|
16 |
def image_classifier(image):
|
|
|
9 |
with fs.open(model_path, 'rb') as f:
|
10 |
model_content = f.read()
|
11 |
|
12 |
+
# Save the model file to disk
|
13 |
+
with open('best_model.h5', 'wb') as f:
|
14 |
+
f.write(model_content)
|
15 |
+
|
16 |
# Load your custom model
|
17 |
+
model = keras.models.load_model('best_model.h5')
|
18 |
|
19 |
# Define a function that takes an image as input and uses the model for inference
|
20 |
def image_classifier(image):
|