Suweeraya commited on
Commit
13f404f
·
1 Parent(s): dd55966

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,13 +1,15 @@
1
  import gradio as gr
2
  from PIL import Image
3
 
4
- size=128
5
- model.load_weights('BreastCancerSegmentation.h5')
6
 
7
  def build_model(input_shape):
8
  model = build_model(input_shape=(size, size, 1))
9
  return model
10
-
 
 
 
11
  def preprocess_image(image, size: int=128):
12
  image = cv2.resize(image, (size,size))
13
  image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
 
1
  import gradio as gr
2
  from PIL import Image
3
 
4
+ size = 128
 
5
 
6
  def build_model(input_shape):
7
  model = build_model(input_shape=(size, size, 1))
8
  return model
9
+
10
+ model = build_model(input_shape=(size, size, 1))
11
+ model.load_weights('BreastCancerSegmentation.h5')
12
+
13
  def preprocess_image(image, size: int=128):
14
  image = cv2.resize(image, (size,size))
15
  image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)