Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,8 @@ from huggingface_hub import hf_hub_download
|
|
12 |
REPO_ID1 = "yashpat85/ResNet01"
|
13 |
MODEL_DIR1 = hf_hub_download(repo_id=REPO_ID1, filename="ResNet01.pkl", repo_type="model")
|
14 |
|
15 |
-
|
16 |
-
|
17 |
|
18 |
REPO_ID3 = "yashpat85/CNNModel2"
|
19 |
MODEL_DIR3 = hf_hub_download(repo_id=REPO_ID3, filename="CNNModel2.pkl", repo_type="model")
|
@@ -21,7 +21,7 @@ MODEL_DIR3 = hf_hub_download(repo_id=REPO_ID3, filename="CNNModel2.pkl", repo_ty
|
|
21 |
|
22 |
resnet_model = pickle.load(open(MODEL_DIR1,'rb'))
|
23 |
cnn_model = pickle.load(open(MODEL_DIR3,'rb'))
|
24 |
-
|
25 |
|
26 |
def show_error_popup(message):
|
27 |
st.error(message, icon="🚨")
|
@@ -54,8 +54,8 @@ if uploaded_file is not None:
|
|
54 |
p = pm.predict_image(cnn_model, image_data)
|
55 |
elif option=="ResNet":
|
56 |
p = pm.predict_image(resnet_model, image_data)
|
57 |
-
|
58 |
-
|
59 |
else:
|
60 |
p = "Other Models are still under training due to overfitting"
|
61 |
|
|
|
12 |
REPO_ID1 = "yashpat85/ResNet01"
|
13 |
MODEL_DIR1 = hf_hub_download(repo_id=REPO_ID1, filename="ResNet01.pkl", repo_type="model")
|
14 |
|
15 |
+
REPO_ID2= "yashpat85/Inception01"
|
16 |
+
MODEL_DIR2 = hf_hub_download(repo_id=REPO_ID2, filename="Inception01.pkl", repo_type="model")
|
17 |
|
18 |
REPO_ID3 = "yashpat85/CNNModel2"
|
19 |
MODEL_DIR3 = hf_hub_download(repo_id=REPO_ID3, filename="CNNModel2.pkl", repo_type="model")
|
|
|
21 |
|
22 |
resnet_model = pickle.load(open(MODEL_DIR1,'rb'))
|
23 |
cnn_model = pickle.load(open(MODEL_DIR3,'rb'))
|
24 |
+
inc_model = pickle.load(open(MODEL_DIR2,'rb'))
|
25 |
|
26 |
def show_error_popup(message):
|
27 |
st.error(message, icon="🚨")
|
|
|
54 |
p = pm.predict_image(cnn_model, image_data)
|
55 |
elif option=="ResNet":
|
56 |
p = pm.predict_image(resnet_model, image_data)
|
57 |
+
elif option=="InceptionNet":
|
58 |
+
p = pm.predict_image(inc_model, image_data)
|
59 |
else:
|
60 |
p = "Other Models are still under training due to overfitting"
|
61 |
|