Welcome to the Semantic Recommender repository! This project showcases an AI-powered article recommender that utilizes sentence embeddings and FAISS for effective semantic search. With a robust FastAPI backend and an interactive Streamlit frontend, this tool provides a seamless experience for content recommendation.
- Introduction
- Features
- Installation
- Usage
- How It Works
- Technologies Used
- Contributing
- License
- Contact
In today's digital age, finding relevant content can be overwhelming. The Semantic Recommender aims to simplify this process by leveraging advanced natural language processing (NLP) techniques. By using sentence embeddings, it can understand the context of articles and recommend similar content effectively.
- AI-Powered Recommendations: The recommender uses machine learning algorithms to suggest articles based on user preferences.
- FastAPI Backend: The backend is built with FastAPI, ensuring fast response times and efficient handling of requests.
- Streamlit Frontend: The user interface is designed with Streamlit, making it easy to navigate and interact with the recommender.
- Semantic Search: Utilizing FAISS, the system performs vector searches to find semantically similar articles.
- Open Source: This project is open-source, encouraging collaboration and improvement from the community.
To set up the Semantic Recommender on your local machine, follow these steps:
-
Clone the Repository:
git clone https://github.com/cinarcy/semantic-recommender.git cd semantic-recommender
-
Install Dependencies: Create a virtual environment and install the required packages.
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` pip install -r requirements.txt
-
Download the Latest Release: Visit the Releases section to download the latest version of the application. Ensure you execute the necessary files as per the instructions provided.
Once you have installed the necessary components, you can start the application. Hereโs how:
-
Start the FastAPI Backend:
uvicorn app.main:app --reload
-
Launch the Streamlit Frontend: In a new terminal, run:
streamlit run app/frontend.py
-
Access the Application: Open your web browser and go to
http://localhost:8000
for the FastAPI interface andhttp://localhost:8501
for the Streamlit frontend.
The Semantic Recommender operates through a series of steps:
-
Data Collection: The system gathers articles from various sources. You can add your own dataset for personalized recommendations.
-
Embedding Generation: Using Hugging Face's sentence transformers, the articles are converted into vector embeddings. This allows the model to capture the semantic meaning of the text.
-
Indexing with FAISS: The embeddings are indexed using FAISS (Facebook AI Similarity Search). This indexing enables quick retrieval of similar articles based on user queries.
-
Recommendation Engine: When a user inputs a query, the system finds the closest embeddings in the index and returns the most relevant articles.
-
User Interaction: The Streamlit frontend provides a user-friendly interface for inputting queries and displaying recommendations.
- FastAPI: A modern web framework for building APIs with Python 3.6+ based on standard Python type hints.
- Streamlit: A library for creating beautiful web apps for machine learning and data science projects.
- FAISS: A library for efficient similarity search and clustering of dense vectors.
- Hugging Face: Provides state-of-the-art pre-trained models for NLP tasks.
- Python: The programming language used for development.
We welcome contributions to enhance the Semantic Recommender. If you would like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature
). - Make your changes and commit them (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any inquiries or feedback, please reach out to the project maintainer:
- Name: [Your Name]
- Email: [your.email@example.com]
- GitHub: Your GitHub Profile
Thank you for checking out the Semantic Recommender! We hope you find it useful for your content recommendation needs. For the latest updates, please visit the Releases section.