drkareemkamal
commited on
Commit
•
27eede3
1
Parent(s):
bbfc6de
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import numpy as np
|
3 |
+
import cv2
|
4 |
+
import tensorflow as tf
|
5 |
+
import streamlit as st
|
6 |
+
from tensorflow.keras.models import load_model
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
+
|
11 |
+
model = "AROI_image_segmentation.keras"
|
12 |
+
|
13 |
+
# Load the model
|
14 |
+
model = load_model(model)
|
15 |
+
print(f"The model loaded successfully")
|
16 |
+
model.compile(
|
17 |
+
loss = 'categorical_crossentropy',
|
18 |
+
optimizer = tf.keras.optimizers.Adam(lr))
|
19 |
+
|