Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -133,8 +133,13 @@ else:
|
|
133 |
st.image(image1,use_column_width = True)
|
134 |
#image_path = Path(f.name)
|
135 |
#st.write(image_path)
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
-
predicted_label,variance_score = occ_predict(
|
138 |
#st.header(predicted_label)
|
139 |
#st.header(str(round(variance_score,2)))
|
140 |
string1 = "The image is," + predicted_label + " with the score value of " + str(round(variance_score,2))
|
|
|
133 |
st.image(image1,use_column_width = True)
|
134 |
#image_path = Path(f.name)
|
135 |
#st.write(image_path)
|
136 |
+
path = f
|
137 |
+
file1 = Image.open(io.BytesIO(image1.get_bytes()))
|
138 |
+
compath = os.path.join(path,file1)
|
139 |
+
print(file1)
|
140 |
+
file1.save(compath,'png')
|
141 |
|
142 |
+
predicted_label,variance_score = occ_predict(file1)
|
143 |
#st.header(predicted_label)
|
144 |
#st.header(str(round(variance_score,2)))
|
145 |
string1 = "The image is," + predicted_label + " with the score value of " + str(round(variance_score,2))
|