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.
๐ง 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
- Start the Streamlit server:
bash
streamlit run app.py
- 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.