Spaces:
Build error
Build error
Update model's response in case of non classification
Browse files
app.py
CHANGED
|
@@ -135,14 +135,18 @@ if st.sidebar.button("Click Here to Classify"):
|
|
| 135 |
time.sleep(2)
|
| 136 |
st.sidebar.success('Done!')
|
| 137 |
|
| 138 |
-
st.sidebar.header("Model
|
| 139 |
|
| 140 |
# Display prediction
|
| 141 |
|
| 142 |
if probability==-1:
|
| 143 |
|
| 144 |
-
st.sidebar.write("
|
| 145 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
|
| 147 |
else:
|
| 148 |
st.sidebar.write(f" It's a(n) <b>{prediction}</b> picture.",'\n', unsafe_allow_html=True)
|
|
|
|
| 135 |
time.sleep(2)
|
| 136 |
st.sidebar.success('Done!')
|
| 137 |
|
| 138 |
+
st.sidebar.header("Model response: ")
|
| 139 |
|
| 140 |
# Display prediction
|
| 141 |
|
| 142 |
if probability==-1:
|
| 143 |
|
| 144 |
+
st.sidebar.write("""I am sorry I am having trouble finding a matching pokemon. <br>
|
| 145 |
+
<b>Potential explanations: </b><br>
|
| 146 |
+
- The image provided is a Pokemon but not from the 1st Generation. <br>
|
| 147 |
+
- The image provided is not a Pokemon. <br>
|
| 148 |
+
- There are too many entities on the image. <br>
|
| 149 |
+
""", unsafe_allow_html=True)
|
| 150 |
|
| 151 |
else:
|
| 152 |
st.sidebar.write(f" It's a(n) <b>{prediction}</b> picture.",'\n', unsafe_allow_html=True)
|