rishab1090 commited on
Commit
475a96c
·
verified ·
1 Parent(s): f3f559d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -18,15 +18,10 @@ import keras
18
  from keras.models import load_model
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
 
 
18
  from keras.models import load_model
19
 
20
 
21
+ from tensorflow.keras.models import load_model
 
 
22
 
23
+ model = load_model("3.keras")
 
24
 
 
 
25
 
26
 
27