Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,16 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
from keras.optimizers import Adam
|
7 |
|
8 |
def build_model(input_shape):
|
9 |
-
size=128
|
10 |
model = build_model(input_shape=(size, size, 1))
|
11 |
-
model.load_weights('BreastCancerSegmentation.h5')
|
12 |
return model
|
13 |
-
|
14 |
def preprocess_image(image, size: int=128):
|
15 |
image = cv2.resize(image, (size,size))
|
16 |
image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
|
|
|
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)
|