Spaces:
Sleeping
Sleeping
Commit ·
5bd3ef0
1
Parent(s): 5d9deaa
Auto-add 'Other' catch-all on classify instead of warning user
Browse files1730 unmodified lines17311732173317341735173617371738173917401741174228 unmodified lines1771177217731774177517761730 unmodified linesst.rerun()if categories_entered and has_other_category and not has_other_category(categories_entered):st.warning("No catch-all category detected. Responses that don't fit your categories ""will still be forced into one. Consider adding **\"Other\"** or ""**\"None of the above\"**.",icon="⚠️",)# Verbosity check results — only show if it matches the current categories.vc = st.session_state.verbosity_check28 unmodified lineselif classify_mode == "Ensemble" and len(models_list) < 3:st.error("Please select at least 3 models for ensemble mode (needed for majority voting)")else:# Set up progress trackingmode = Noneif input_type_selected == "pdf":1730 unmodified lines173117321733173417351736173728 unmodified lines176617671768176917701771177217731774177517761730 unmodified linesst.rerun()if categories_entered and has_other_category and not has_other_category(categories_entered):st.caption("An **\"Other\"** catch-all category will be added automatically when you classify.")# Verbosity check results — only show if it matches the current categories.vc = st.session_state.verbosity_check28 unmodified lineselif classify_mode == "Ensemble" and len(models_list) < 3:st.error("Please select at least 3 models for ensemble mode (needed for majority voting)")else:# Auto-append "Other" catch-all if the user didn't include one,# so responses that don't fit are captured rather than force-fit.if has_other_category and not has_other_category(categories_entered):categories_entered.append("Other")# Set up progress trackingmode = Noneif input_type_selected == "pdf":
app.py+6-6