https://github.com/rohitedathil/sentencegenerator
A website which generates sentences using markov chains.
https://github.com/rohitedathil/sentencegenerator
ai fastapi hacktoberfest markov-chain python sentence-generator
Last synced: about 2 months ago
JSON representation
A website which generates sentences using markov chains.
- Host: GitHub
- URL: https://github.com/rohitedathil/sentencegenerator
- Owner: RohitEdathil
- License: mit
- Created: 2021-09-14T15:17:43.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-08T10:11:02.000Z (over 2 years ago)
- Last Synced: 2025-01-30T20:39:01.211Z (4 months ago)
- Topics: ai, fastapi, hacktoberfest, markov-chain, python, sentence-generator
- Language: Python
- Homepage:
- Size: 29 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Sentence Generator ✨
## [See Demo 👈](https://sentencesimulator.web.app/)
This project generates sentences based on [Markov Chains](https://en.wikipedia.org/wiki/Markov_chain).
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 🛠
```python
model = Generator("") # 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.
```python
train("","< Model Name >"[,])
```# API
api.py is a FastAPI based app which provides an API interaction with the models.
# Screenshots 🌆


# Similar (and cooler 🤩) Projects
These are the projects from which I got inspired from.
- [Subreddit Simulator](https://www.reddit.com/r/SubredditSimulator/)
- [Donald Trump tweet simulator](https://filiph.github.io/markov/)