scimone / TrumpSpeechGenerator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trump Speech Generator

The repository contains a Jupyter Notebook script that corresponds to the blog post Trump Speech Generator: Exploring PyTorch’s Potential with LSTM-based Language Models which explores the implementation of a character-level language model to generate text in the style of Donald Trump's speeches. The blog post can be found here.

Description

The Jupyter Notebook shows the process of training a CharRNN (Character RNN) language model, using the LSTM (Long Short-Term Memory) architecture. The model is trained on a dataset of Trump's speeches, with the aim of generating text that captures his speaking style.

Requirements

pip3 install matplotlib
pip3 install numpy
pip3 install torch

Usage

Clone the repository to your local machine. Open the Jupyter Notebook Trump_Speech_Generator.ipynb in your preferred environment (e.g., Jupyter Notebook, Google Colab). Follow the step-by-step instructions provided in the notebook to set up the environment, load and preprocess the dataset, define the CharRNN model, train the model, and generate text.

Attribution

The dataset used in this project was sourced from the Trump Speeches GitHub repository, courtesy of Ryan McDermott.

Note

Keep in mind that this notebook is intended for fun and creative purposes only. The model's text generation, while capturing the essence of Trump's style, may not always adhere to grammatical rules. Refer to the accompanying blog post for further insights and explanations. Feel free to experiment and adapt the code to your own projects. If you have any questions or suggestions, please don't hesitate to reach out. For a comprehensive understanding of the project's details and context, refer to the associated blog post here.

About

License:MIT License


Languages

Language:Jupyter Notebook 100.0%