This API generates text based on the works of William Shakespeare using an N-gram model. It allows users to input a prompt and receive suggestions for the next word, enhancing the creative writing process.
To run the API, execute the following command in the terminal:
python generate.py
Make sure you have the required dependencies installed. You can do this by running:
pip install flask flask-cors
The script uses a pre-existing file named shakespeare_set.txt, which contains the text of Shakespeare's works. Ensure that this file is in the same directory as the script.
Watch the demo video to see the API in action:
example.video.mp4
Feel free to fork the repository and submit pull requests. Any contributions to improve the API or its documentation are welcome!