VishnuEcoClim commited on
Commit
7d749db
·
1 Parent(s): 7958075

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -5,10 +5,16 @@ from PIL import Image
5
  import urllib.request
6
  from utils import *
7
 
8
- # Initialize and build the model first
9
- model = model_arc()
10
- model.load_weights("classify_model.h5")
 
 
 
 
 
11
 
 
12
  labels = gen_labels()
13
 
14
  html_temp = '''
 
5
  import urllib.request
6
  from utils import *
7
 
8
+ def build_and_load_model():
9
+ # Initialize and build the model first
10
+ model = model_arc()
11
+ dummy_input = tf.zeros((1, 256, 256, 3))
12
+ model.build(input_shape=dummy_input.shape)
13
+ model(dummy_input)
14
+ model.load_weights("classify_model.h5")
15
+ return model
16
 
17
+ model = build_and_load_model()
18
  labels = gen_labels()
19
 
20
  html_temp = '''