Spaces:
Sleeping
Sleeping
Commit
·
336b010
1
Parent(s):
6d7f80e
Update app.py
Browse filesChanged probability to confidence
app.py
CHANGED
@@ -154,11 +154,11 @@ def main():
|
|
154 |
st.session_state["text"] = text
|
155 |
|
156 |
# Print result
|
157 |
-
st.markdown(f"I think this text is: **:{st.session_state['color_pred']}[{st.session_state['prediction']}]** (
|
158 |
|
159 |
elif "prediction" in st.session_state:
|
160 |
# Display the stored result if available
|
161 |
-
st.markdown(f"I think this text is: **:{st.session_state['color_pred']}[{st.session_state['prediction']}]** (
|
162 |
|
163 |
if st.button("Model Explanation"):
|
164 |
# Check if there's text in the session state
|
|
|
154 |
st.session_state["text"] = text
|
155 |
|
156 |
# Print result
|
157 |
+
st.markdown(f"I think this text is: **:{st.session_state['color_pred']}[{st.session_state['prediction']}]** (Confidence: {st.session_state['predict_proba'] * 100}%)")
|
158 |
|
159 |
elif "prediction" in st.session_state:
|
160 |
# Display the stored result if available
|
161 |
+
st.markdown(f"I think this text is: **:{st.session_state['color_pred']}[{st.session_state['prediction']}]** (Confidence: {st.session_state['predict_proba'] * 100}%)")
|
162 |
|
163 |
if st.button("Model Explanation"):
|
164 |
# Check if there's text in the session state
|