Spaces:
Sleeping
Sleeping
modified model
Browse files
app.py
CHANGED
@@ -20,11 +20,13 @@ if file_name is not None:
|
|
20 |
col1, col2 = st.columns(2)
|
21 |
image = Image.open(file_name)
|
22 |
col1.image(image, use_column_width=True)
|
23 |
-
|
|
|
24 |
col2.header("Prediction:")
|
25 |
for p in predictions:
|
26 |
-
st.write(p, ': ', predictions[p])
|
27 |
print(predictions)
|
28 |
-
|
|
|
|
|
29 |
else:
|
30 |
st.write('Please upload a file!')
|
|
|
20 |
col1, col2 = st.columns(2)
|
21 |
image = Image.open(file_name)
|
22 |
col1.image(image, use_column_width=True)
|
23 |
+
with st.spinner('Wait for it...'):
|
24 |
+
predictions = predict(file_name)
|
25 |
col2.header("Prediction:")
|
26 |
for p in predictions:
|
|
|
27 |
print(predictions)
|
28 |
+
perecent_pred = round(predictions[p] * 100, 1)
|
29 |
+
col2.subheader(f"{ p }: { perecent_pred }%")
|
30 |
+
val = st.slider(p, 0, 100, perecent_pred, true)
|
31 |
else:
|
32 |
st.write('Please upload a file!')
|