Giter VIP home page Giter VIP logo

schlager-ai's Introduction

Schlager AI

Schlager lyric generation using transformers

Setup

Requirements

  • Python 3.8
  • pip 19.0 or later pip install --upgrade pip

Environment Setup

  1. Create virtual environment python3 -m venv .venv
  2. Activate virtual environment source .venv/bin/activate (Linux) or source .venv/Scripts/activate (Windows)
  3. Update pip pip install --upgrade pip
  4. CUDA 10.2 only change torch==1.8.2+cu111 to torch==1.8.2+cu102
  5. Install requirements pip install -r requirements.txt -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
  6. Install dev requirements pip install -r requirements-dev.txt
  7. Install schlag package in edit mode pip install -e .
  8. Setup Genius and Spotify developer accounts and set SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET and GENIUS_TOKEN environment variables (optionally in .env to be used by dotenv)

Usage

  1. Scrape dataset scripts/scraper.py
  2. Train model scripts/train.py
  3. Generate text scripts/generate.py

Repo Structure

The following is the basic structure for organizing code. It is suggested that you follow this format to help standardize projects in the cluster. However, it is possible to add/change names of submodules under schlag and to add further configuration files for other tools + Dockerfiles.

root/
|   requirements.txt : Required python modules and versions.
|   requirements-dev.txt : Required python modules and versions for development.
|   setup.cfg : Tool configuration file.
|   setup.py : For creating the schlag module.
|
└───schlag/ : schlag package source.
|   |   config.py : Shared config file.
|   |
|   └───data/ : Data processing pipeline code.
|
└───data/ : Raw/processed training data.
|
└───results/ : Where any training/analysis artifacts are output.
|
└───scripts/ : All CLI scripts.

Development

Git Workflow

We follow the feature branch workflow in this project. To contribute code, please create a branch off of master with a descriptive identifier. When the code is ready and stable, please create a merge request and assign a reviewer. Once approved, the code will be merged into master and the feature branch will be deleted.

Code Formatters

  • Black is used for formatting. To use, just run black {source_file_or_directory}.
  • isort is used for sorting imports. To use, just run isort {sorce_file_or_directory}.

Code Linting

  • pylint is used for linting. To use, just run pylint {source_file_or_directory}.

schlager-ai's People

Contributors

djwessel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.