This project generates sentences based on Markov Chains. All the sentences are generated based on a particular theme as mentioned in the below section.
- Quotes: Trained with data from around 70K+ tweets
- Shakespeare: Trained with data from around 100K+ lines of Shakespeare
- Whatsapp: Trained with data from around 14K+ lines of WhatsApp group messages
- News: Trained with data from around 1.2M+ lines of news headlines
model = Generator("<Model Name>") # Loads the model from models/
print(model.get()) # Generates a sentence and prints it
See workspace.ipynb for more usage details.
Each file should have sentences separated by newlines.
train("<filename>","< Model Name >"[,<Number of Sentences>])
api.py is a FastAPI based app which provides an API interaction with the models.
These are the projects from which I got inspired from.