Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,14 +32,16 @@ model = models.Sequential([
|
|
| 32 |
layers.Dense(6, activation='softmax')
|
| 33 |
])
|
| 34 |
'''
|
| 35 |
-
model = tf.keras.models.load_model("model_weights.h5")
|
| 36 |
|
| 37 |
# ---- Load trained weights ----
|
|
|
|
| 38 |
if os.path.exists("model_weights.h5"):
|
| 39 |
model.load_weights("model_weights.h5")
|
| 40 |
print("Weights loaded successfully.")
|
| 41 |
else:
|
| 42 |
print("model_weights.h5 not found! Current directory:", os.listdir())
|
|
|
|
|
|
|
| 43 |
|
| 44 |
# ---- Preprocess image ----
|
| 45 |
def preprocess(image: Image.Image):
|
|
|
|
| 32 |
layers.Dense(6, activation='softmax')
|
| 33 |
])
|
| 34 |
'''
|
|
|
|
| 35 |
|
| 36 |
# ---- Load trained weights ----
|
| 37 |
+
'''
|
| 38 |
if os.path.exists("model_weights.h5"):
|
| 39 |
model.load_weights("model_weights.h5")
|
| 40 |
print("Weights loaded successfully.")
|
| 41 |
else:
|
| 42 |
print("model_weights.h5 not found! Current directory:", os.listdir())
|
| 43 |
+
'''
|
| 44 |
+
model = tf.keras.models.load_model("model_weights.h5")
|
| 45 |
|
| 46 |
# ---- Preprocess image ----
|
| 47 |
def preprocess(image: Image.Image):
|