Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -111,8 +111,8 @@ else:
|
|
111 |
return "Occluded",score
|
112 |
|
113 |
f = st.file_uploader('Upload an Image',type=(["jpeg","jpg","png"]))
|
114 |
-
st.write(f)
|
115 |
-
st.subheader("Prediction of Occluded or Not Occluded")
|
116 |
images1 = ["img1.png","img2.png","img3.png","img4.png"]
|
117 |
with st.sidebar:
|
118 |
st.write("choose an image")
|
@@ -123,10 +123,10 @@ else:
|
|
123 |
else:
|
124 |
image1= Image.open(f)
|
125 |
st.image(image1,use_column_width = True)
|
126 |
-
|
127 |
#st.header(predicted_label)
|
128 |
#st.header(str(round(variance_score,2)))
|
129 |
-
string1 = "The image is," +
|
130 |
st.subheader(string1)
|
131 |
|
132 |
#predicted_label, score = occ_predict("/content/drive/MyDrive/Occulded.jpg")
|
|
|
111 |
return "Occluded",score
|
112 |
|
113 |
f = st.file_uploader('Upload an Image',type=(["jpeg","jpg","png"]))
|
114 |
+
#st.write(f)
|
115 |
+
#st.subheader("Prediction of Occluded or Not Occluded")
|
116 |
images1 = ["img1.png","img2.png","img3.png","img4.png"]
|
117 |
with st.sidebar:
|
118 |
st.write("choose an image")
|
|
|
123 |
else:
|
124 |
image1= Image.open(f)
|
125 |
st.image(image1,use_column_width = True)
|
126 |
+
predicted_label,variance_score = occ_predict(image1)
|
127 |
#st.header(predicted_label)
|
128 |
#st.header(str(round(variance_score,2)))
|
129 |
+
string1 = "The image is," + predicted_label + " with the score value of " + str(round(variance_score,2))
|
130 |
st.subheader(string1)
|
131 |
|
132 |
#predicted_label, score = occ_predict("/content/drive/MyDrive/Occulded.jpg")
|