Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.5 KB

readme.md

File metadata and controls

45 lines (30 loc) · 1.5 KB

Sentence Generator ✨

This project generates sentences based on Markov Chains. All the sentences are generated based on a particular theme as mentioned in the below section.

Available Models

  • 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

Usage 🛠

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.

Training 🏃‍♂️

Each file should have sentences separated by newlines.

train("<filename>","< Model Name >"[,<Number of Sentences>])

API

api.py is a FastAPI based app which provides an API interaction with the models.

Screenshots 🌆

Screenshot1 Screenshot2 Screenshot3

Similar (and cooler 🤩) Projects

These are the projects from which I got inspired from.