Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -57,20 +57,20 @@ if file is not None:
|
|
57 |
img_reshaped = image_resize(df)
|
58 |
|
59 |
# Get prediction
|
60 |
-
pred = model.predict(img_reshaped
|
61 |
label = np.argmax(pred)
|
62 |
|
63 |
-
label_map = {4: ('nv', ' melanocytic nevi'),
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
if label in label_map:
|
72 |
-
|
73 |
-
|
74 |
|
75 |
# Display image and result
|
76 |
col1, col2 = st.columns(2)
|
@@ -79,7 +79,8 @@ if file is not None:
|
|
79 |
# st.image(image)
|
80 |
with col2:
|
81 |
st.header("Prediction")
|
82 |
-
st.
|
|
|
83 |
|
84 |
|
85 |
# import streamlit as st
|
|
|
57 |
img_reshaped = image_resize(df)
|
58 |
|
59 |
# Get prediction
|
60 |
+
pred = model.predict(img_reshaped)
|
61 |
label = np.argmax(pred)
|
62 |
|
63 |
+
# label_map = {4: ('nv', ' melanocytic nevi'),
|
64 |
+
# 6: ('mel', 'melanoma'),
|
65 |
+
# 2: ('bkl', 'benign keratosis-like lesions'),
|
66 |
+
# 1: ('bcc' , ' basal cell carcinoma'),
|
67 |
+
# 5: ('vasc', 'pyogenic granulomas and hemorrhage'),
|
68 |
+
# 0: ('akiec', 'Actinic keratoses and intraepithelial carcinomae'),
|
69 |
+
# 3: ('df', 'dermatofibroma')}
|
70 |
+
|
71 |
+
# if label in label_map:
|
72 |
+
# label_name = label_map[label][0]
|
73 |
+
# full_name = label_map[label][1]
|
74 |
|
75 |
# Display image and result
|
76 |
col1, col2 = st.columns(2)
|
|
|
79 |
# st.image(image)
|
80 |
with col2:
|
81 |
st.header("Prediction")
|
82 |
+
st.write(label)
|
83 |
+
# st.metric("Digit", full_name)
|
84 |
|
85 |
|
86 |
# import streamlit as st
|