Skip to content

Feature/streamlit tfidf config#1643

Open
Prateek2007-cmd wants to merge 4 commits into
leonagoel:mainfrom
Prateek2007-cmd:feature/streamlit-tfidf-config
Open

Feature/streamlit tfidf config#1643
Prateek2007-cmd wants to merge 4 commits into
leonagoel:mainfrom
Prateek2007-cmd:feature/streamlit-tfidf-config

Conversation

@Prateek2007-cmd

@Prateek2007-cmd Prateek2007-cmd commented Jun 13, 2026

Copy link
Copy Markdown

Description

exposing TF-IDF Vectorizer configuration controls directly within the Streamlit UI's sidebar. This allows users to dynamically tune text processing parameters based on their custom dataset sizes before building the Content-Based recommendation model.
Closes #1637
Changes included:

  • Dynamic Configuration: Added Streamlit sidebar controls for N-gram Range (slider for unigrams, bigrams, etc.), Max Features (number input), and Stop Words (dropdown for English, None, or Custom lists).
  • Custom Stop Words Support: Added a conditional text input field to allow users to provide their own comma-separated stop words.
  • Model Builder Integration: Passed the dynamic configuration variables directly into the ContentRecommender initialization step.
  • Feedback Display: Added an st.info banner that displays the exact number of vocabulary features extracted (e.g., TF-IDF Vectorizer built with 10,000 features) after the model finishes building.

Related Issues

  • Resolves #1598

Type of Change

  • New Feature (Streamlit UI Controls)

Testing

  • Verified selecting different max features correctly updates the total resulting features in the UI.
  • Verified selecting the "Custom" stop words option correctly processes the comma-separated strings and successfully initializes the sklearn vectorizer.

@github-actions

Copy link
Copy Markdown

🎉 Welcome to Hybrid Recommender, @Prateek2007-cmd! This is your first contribution here!

Labels added: gssoc:approved | mentor:leonagoel | status:review-needed

PR Description Checklist:

NO - What changed section
NO - Why section
NO - How to test section
YES - Related issue linked

⚠️ Some required sections are missing. Please update your PR description.

What happens next:

  1. @leonagoel will review your changes
  2. CI checks must pass
  3. Once approved, this PR will be auto-merged

⏱️ Please respond to review comments within 48 hours.

@github-actions github-actions Bot requested a review from leonagoel June 13, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redundant Accessibility Links (index.html)

1 participant