Commit
·
7b916d6
1
Parent(s):
04b7787
Update app.py
Browse files
app.py
CHANGED
@@ -9,12 +9,22 @@ import numpy as np
|
|
9 |
import cv2
|
10 |
from Utils import *
|
11 |
|
|
|
|
|
|
|
12 |
|
13 |
-
from huggingface_hub import from_pretrained_keras
|
14 |
|
15 |
model = from_pretrained_keras("SerdarHelli/Knee-View-Merchant-Landmark-Detection",use_auth_token=os.environ.get("TOKEN_FROM_SECRET"))
|
16 |
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
st.subheader("Upload Merchant Knee View")
|
19 |
image_file = st.file_uploader("Upload Images", type=["dcm"])
|
20 |
|
|
|
9 |
import cv2
|
10 |
from Utils import *
|
11 |
|
12 |
+
from huggingface_hub import hf_hub_download,from_pretrained_keras
|
13 |
+
|
14 |
+
import tensorflow as tf
|
15 |
|
|
|
16 |
|
17 |
model = from_pretrained_keras("SerdarHelli/Knee-View-Merchant-Landmark-Detection",use_auth_token=os.environ.get("TOKEN_FROM_SECRET"))
|
18 |
|
19 |
|
20 |
+
|
21 |
+
file_path = hf_hub_download("SerdarHelli/Knee-View-Merchant-Landmark-Detection","keras",use_auth_token=os.environ.get("TOKEN_FROM_SECRET"))
|
22 |
+
|
23 |
+
|
24 |
+
model = tf.keras.load_model(file_path)
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
st.subheader("Upload Merchant Knee View")
|
29 |
image_file = st.file_uploader("Upload Images", type=["dcm"])
|
30 |
|