Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,14 +19,14 @@ from keras.models import load_model
|
|
| 19 |
|
| 20 |
|
| 21 |
# Read the model file into memory
|
| 22 |
-
with open("
|
| 23 |
byte_data = f.read()
|
| 24 |
|
| 25 |
# Wrap in a BytesIO object
|
| 26 |
model_file = io.BytesIO(byte_data)
|
| 27 |
|
| 28 |
# Load the model, giving a valid .keras filename
|
| 29 |
-
model = tf.keras.models.load_model(("
|
| 30 |
|
| 31 |
|
| 32 |
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
# Read the model file into memory
|
| 22 |
+
with open("3.keras", "rb") as f:
|
| 23 |
byte_data = f.read()
|
| 24 |
|
| 25 |
# Wrap in a BytesIO object
|
| 26 |
model_file = io.BytesIO(byte_data)
|
| 27 |
|
| 28 |
# Load the model, giving a valid .keras filename
|
| 29 |
+
model = tf.keras.models.load_model(("3.keras", model_file))
|
| 30 |
|
| 31 |
|
| 32 |
|