All projects

Repository

Post-recommendation-system

This project is an NLP-based intelligent post recommendation system built with Python, Streamlit, spaCy, TF-IDF, cosine similarity, and SQLite database.

View source Python0 stars ยท 0 forks

๐Ÿง Intelligent Post Recommendation System

This project is an NLP-based intelligent post recommendation system built with Python, Streamlit, spaCy, TF-IDF, cosine similarity, and SQLite database.

It allows users to add posts, fetch similar posts based on a query, and view all posts in the database.


๐Ÿš€ Features

  • Intelligent recommendation of similar posts based on user query.
  • Add new posts through a simple web UI.
  • View all posts stored in a database.
  • Preprocessing using spaCy (lemmatization, stopword removal).
  • TF-IDF vectorization and cosine similarity for recommendations.
  • SQLite database for storage.
  • Easy-to-run with Streamlit app interface.

๐Ÿ› ๏ธ Technologies Used

  • Python 3.x
  • Streamlit
  • spaCy (en_core_web_sm)
  • scikit-learn (TF-IDF + cosine similarity)
  • SQLite (built-in DB)
  • Pandas

๐Ÿ“† Installation

First, clone the repository or copy the code files:

git clone https://github.com/nabeel03103n/Post-recommendation-system.git
cd post-recommendation-system

Install the required dependencies:

pip install streamlit spacy scikit-learn pandas
python -m spacy download en_core_web_sm

๐Ÿ“‚ Project Structure

post-recommendation-system/
โ”œโ”€โ”€ app.py               # Main Streamlit app
โ”œโ”€โ”€ seed_posts.py         # (Optional) Script to populate database with 1000+ posts
โ”œโ”€โ”€ posts.db              # SQLite database file (auto-created)
โ””โ”€โ”€ README.md             # Project documentation

โšก Running the Application

  1. Start the Streamlit server:

bash streamlit run app.py

  1. It will open automatically in your browser at: http://localhost:8501

๐Ÿ“ Usage

  • Recommend: Enter a query/post idea, and get top similar posts.
  • Add Post: Add new posts manually through the UI.
  • View All Posts: See all stored posts in a table view.

If you want to preload 1000+ sample posts:

python seed_posts.py

Then refresh your app.


๐Ÿง€ Example Queries

  • "Deploy an AI chatbot using Python."
  • "Learn computer vision with OpenCV."
  • "Introduction to blockchain technology."
  • "Master deep learning best practices."

๐ŸŒŸ Future Improvements (Ideas)

  • Add categories/tags for better filtering.
  • Enable user authentication (login/signup).
  • Migrate database to PostgreSQL/MySQL for production.
  • Improve UI using Streamlit Components or Tailwind + Streamlit.

๐Ÿค Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


๐Ÿ“„ License

This project is licensed under the MIT License.


Built with โค๏ธ using Python and Streamlit.