fcossio commited on
Commit
c9a01bf
1 Parent(s): d4c5773

new model working

Browse files
Files changed (2) hide show
  1. app.py +5 -2
  2. requirements.txt +2 -1
app.py CHANGED
@@ -6,12 +6,15 @@ from itertools import islice
6
  from PIL import Image, ImageDraw, ImageColor
7
  from line_fit import LineFit
8
  import random
 
9
 
10
  MAX_SELECTIONS = 8
11
  input_shape = (MAX_SELECTIONS,256,256,2)
12
  def load_model():
13
- model = tf.keras.models.load_model('vivid-sweep-model-best.hdf5')
14
- return model
 
 
15
 
16
  model = load_model()
17
  colors = list(ImageColor.colormap.keys())
 
6
  from PIL import Image, ImageDraw, ImageColor
7
  from line_fit import LineFit
8
  import random
9
+ import lwbna_unet as u
10
 
11
  MAX_SELECTIONS = 8
12
  input_shape = (MAX_SELECTIONS,256,256,2)
13
  def load_model():
14
+ unet = u.LWBNAUnet(1,64,4,4)
15
+ unet.build(input_shape)
16
+ unet.load_weights('robust-energy-model-best.hdf5')
17
+ return unet
18
 
19
  model = load_model()
20
  colors = list(ImageColor.colormap.keys())
requirements.txt CHANGED
@@ -1,4 +1,5 @@
1
  tensorflow
2
  opencv-python
3
  gradio
4
- scipy
 
 
1
  tensorflow
2
  opencv-python
3
  gradio
4
+ scipy
5
+ lwbna-unet