Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,8 @@ from huggingface_hub import hf_hub_download
|
|
7 |
model_path = hf_hub_download(repo_id="SalmanAboAraj/Tooth1", filename="unet_model.h5")
|
8 |
model = load_model(model_path)
|
9 |
def predict(image):
|
10 |
-
original_height, original_width, _ = image.shape
|
|
|
11 |
image = cv2.resize(image, (128, 128))
|
12 |
image = np.expand_dims(image, axis=0)
|
13 |
image = np.expand_dims(image, axis=-1)
|
|
|
7 |
model_path = hf_hub_download(repo_id="SalmanAboAraj/Tooth1", filename="unet_model.h5")
|
8 |
model = load_model(model_path)
|
9 |
def predict(image):
|
10 |
+
original_height, original_width, _ = image.shape
|
11 |
+
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
12 |
image = cv2.resize(image, (128, 128))
|
13 |
image = np.expand_dims(image, axis=0)
|
14 |
image = np.expand_dims(image, axis=-1)
|