Skip to content

Catnatsuki/Shakespear-TextGen

Repository files navigation

Shakespear-TextGen

This is a small NLP project I did to get started with NLP. It is based on the tensorflow shakespeak dataset and once trained can generate new text in shakespear's writing style.

Installation

To use this model, you need to clone this repository to your local machine. You can do this by executing the following command: git clone https://github.com/your-username/repository-name.git

Make sure you have Git installed on your machine before running the command.

Model Training

  1. After cloning the repository, navigate to the project directory.

  2. Run the Jupyter Notebook file text_generation_shakespeare_rnn.ipynb. This notebook contains the code for training the model.

  3. Follow the instructions in the notebook to train the model. Once the training is complete, the trained model will be saved in the same folder.

Running the Flask Frontend

  1. Open the file flaskfrontend.py in your preferred code editor.

  2. Make sure you have Flask installed on your machine. If not, you can install it by running the following command: pip install flask

  3. Run the flaskfrontend.py file. The Flask application will start running on localhost with port 5000.

The Flask application will start running on localhost with port 5000.

Making Predictions

  1. Open your web browser and navigate to localhost:5000.

  2. Use the frontend interface to make predictions using the trained model. Follow the instructions provided on the webpage to input the necessary data and get predictions.

Note: Ensure that the model has been trained and saved before making predictions. If not, please refer to the "Model Training" section.

License

This project is licensed under the MIT License. Feel free to modify and distribute this code as per the terms of the license.

About

A small NLP project I did which can generate text in the style of shakespear.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published