{"id":21944233,"url":"https://github.com/andriikot/smartmatch","last_synced_at":"2026-04-04T08:44:26.806Z","repository":{"id":264837470,"uuid":"894431276","full_name":"AndriiKot/SmartMatch","owner":"AndriiKot","description":"Smart Match with python","archived":false,"fork":false,"pushed_at":"2024-12-02T12:27:47.000Z","size":143,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-27T16:48:22.277Z","etag":null,"topics":["docker","faiss","huggingface","numpy","ptyhon","pythorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndriiKot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-26T10:48:39.000Z","updated_at":"2024-12-02T12:27:42.000Z","dependencies_parsed_at":"2024-11-26T11:46:04.422Z","dependency_job_id":"678aefc9-446c-4121-9877-51e152bc2cd2","html_url":"https://github.com/AndriiKot/SmartMatch","commit_stats":null,"previous_names":["andriikot/smartmatch"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndriiKot%2FSmartMatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndriiKot%2FSmartMatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndriiKot%2FSmartMatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndriiKot%2FSmartMatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndriiKot","download_url":"https://codeload.github.com/AndriiKot/SmartMatch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244982060,"owners_count":20542300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","faiss","huggingface","numpy","ptyhon","pythorch"],"created_at":"2024-11-29T04:15:11.444Z","updated_at":"2025-12-30T20:43:25.441Z","avatar_url":"https://github.com/AndriiKot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SmartMatch\n\n### Please note that Python version 3.13 may not work correctly with the 'PyTorch' library!\n\nThis project is designed to find the most similar song based on the text provided by the user. It utilizes a transformer model from the `transformers` library for vectorizing song lyrics and computes similarity using cosine similarity.\n\n## Technologies:\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth height=33 width=100\u003ePython\u003c/th\u003e\n      \u003cth height=33 width=100\u003eJupyter\u003c/th\u003e\n      \u003cth height=33 width=100\u003eHugging Face\u003c/th\u003e\n      \u003cth height=33 width=100\u003ePyTorch\u003c/th\u003e\n      \u003cth height=33 width=100\u003eNumPy\u003c/th\u003e\n      \u003cth height=33 width=100\u003eFaiss\u003c/th\u003e\n      \u003cth height=33 width=100\u003e \u003ca href=https://developer.hashicorp.com/vagrant/docs\u003eDocker\u003c/a\u003e\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd height=100 width=100\u003e\n        \u003ca href=https://www.python.org/\u003e\n          \u003cimg src=https://github.com/AndriiKot/SmartMatch/blob/main/technologies/icons/python.svg alt=Python\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd height=100 width=100\u003e\n        \u003ca href=https://jupyter.org/\u003e\n          \u003cimg src=https://github.com/AndriiKot/SmartMatch/blob/main/technologies/icons/jupyter.svg alt=Jupyter\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd height=100 width=100\u003e\n        \u003ca href=https://huggingface.co/\u003e\n          \u003cimg src=https://github.com/AndriiKot/SmartMatch/blob/vectors/technologies/icons/huggingface.svg alt=\"Hugging Face\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd height=100 width=100\u003e\n        \u003ca href=https://pytorch.org/\u003e\n          \u003cimg src=https://github.com/AndriiKot/SmartMatch/blob/vectors/technologies/icons/pytorch.svg alt=\"PyTorch\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd height=100 width=100\u003e\n        \u003ca href=https://numpy.org/\u003e\n          \u003cimg src=https://github.com/AndriiKot/SmartMatch/blob/vectors/technologies/icons/numpy.svg alt=\"NumPy\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd height=\"100\" width=\"100\"\u003e\n        \u003ca href=\"https://faiss.ai/\"\u003e\n          \u003ch2\u003eFaiss\u003c/h2\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd height=100 width=100\u003e\n        \u003ca href=https://docs.docker.com/\u003e\n          \u003cimg src=https://github.com/AndriiKot/SmartMatch/blob/docker/technologies/icons/docker.svg alt=Docker\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Contents\n\n- [Functionality](#functionality)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Notes](#notes)\n\n## Functionality\n\nThe program allows you to:\n\n- Load song lyrics from text files.\n- Vectorize song lyrics using the `distilbert-base-uncased` model.\n- Find the most similar song based on the user-provided text.\n\n## Requirements\n\nTo run the program, you need to install the following libraries:\n\n- `transformers`\n- `torch`\n- `scikit-learn`\n\n\u003e **Note:** If you are running the code outside of a Jupyter Notebook, it is recommended to use Python version 3.10 or higher.\n\n## Installation\n\nTo install the necessary libraries, run the following command in your terminal:\n\n```bash\npip install transformers torch scikit-learn\n```\n\n## Usage\n\n1. **Data Preparation:**\n\n   - Create a folder named `data` in the directory where your script is located.\n   - Place text files containing the song lyrics in this folder. Make sure all files have a `.txt` extension.\n\n2. **Running the Program:**\n\n   - If you are using Jupyter Notebook, open your notebook and proceed as described below.\n   - If you are not using Jupyter, save the following initial code to a file named `main.py` and run it using the command:\n\n   ```bash\n   py -3.10 main.py\n   ```\n\n   or\n\n   ```bash\n   py -3.11 main.py\n   ```\n\n## Attention\n\n- Copy and paste the provided program code into your script.\n\n3. **Text Input:**\n\n   - After running the code, enter the text for which you want to find a similar song when prompted.\n\n   Example code for text input:\n\n   ```python\n   user_input = input(\"Please enter the text you want to find a similar song for: \")\n   similar_song_name, similarity_score = find_similar_song(user_input)\n   print(f\"The most similar song is: {similar_song_name} with a similarity score of {similarity_score:.4f}\")\n   ```\n\n## Notes\n\n- If you do not have a Graphics Processing Unit (GPU), make sure that `PyTorch` is installed with CPU support, or simply use the CPU as your device.\n- Depending on the volume of songs you have loaded and the power of your computer, vector calculation may take some time.\n\n## License\n\nThis project is licensed under the MIT License. Please refer to the LICENSE file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandriikot%2Fsmartmatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandriikot%2Fsmartmatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandriikot%2Fsmartmatch/lists"}