This is an introductory guide on text generation using RNNs and Keras. Please follow the steps mentioned below. This tutorial will require Python3.x
You can create your virtual environment using either Anaconda or Virtualenv. Follow the links for instructions on how to set up your environment
Make sure to create a python3.x environment
You can check to see that your environment is created with the correct python version by activating your environment and running the command python --version
. You should see a version greater than 3.
- Clone the project into a local directory
git clone https://github.com/kirit93/Personal.git
cd text_generation_keras
- Install the dependencies by running
pip install -r requirements.txt
- Run the notebook by running
jupyter notebook
- To run the code
For training -python text_gen.py --mode train
For testing -python text_gen.py --mode test
.
While testing make sure to include the path to the weight file in the code.