https://github.com/torinriley/socialengine
Social media recommendation engine
https://github.com/torinriley/socialengine
Last synced: about 1 month ago
JSON representation
Social media recommendation engine
- Host: GitHub
- URL: https://github.com/torinriley/socialengine
- Owner: torinriley
- Created: 2024-12-18T23:39:21.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-19T01:21:06.000Z (5 months ago)
- Last Synced: 2025-04-04T00:12:11.556Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Social Media Recommendation Engine
This project focuses on building a recommendation engine using social media data, specifically Instagram data.
## Dataset
The dataset used for this analysis can be found on Kaggle: [Instagram Data](https://www.kaggle.com/datasets/amirmotefaker/instagram-data)
## Project Structure
- `data/`: Contains the dataset and any data preprocessing scripts.
- `src/`: Source code for data processing and model training.
- `static/`: Static files such as images and JavaScript.
- `templates/`: HTML templates for the Flask app.## Installation
To install the required dependencies, run:
```bash
pip install -r requirements.txt
```## Flask Application
This is a Flask application that serves a social media recommendation engine.### Content-Based Filtering
The algorithm uses TF-IDF (Term Frequency-Inverse Document Frequency) to vectorize the captions and hashtags of the posts.- `compute_similarity_matrix(posts)`: Creates a TF-IDF matrix from the captions and hashtags of all posts.
- `recommend_posts(liked_posts, all_posts)`: Generates recommendations based on the posts that the user has liked.