Skip to content

in this project i use tesorflow and python with an dataset from huging face to make smple text generation πŸ˜ƒπŸ€Œ. if like this project you can read some article about machine learning in my Medium account πŸ‘‡

LiyaUnknown/SimpleTextGeneration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SimpleTextGeneration

in this project i use tesorflow and python with an dataset from huging face to make smple text generation πŸ˜ƒπŸ€Œ. if like this project you can read some article about machine learning in my Medium account πŸ‘‰ https://medium.com/@liyafarahani

if you are beginner in how #neural network works# you can see this article in my medium account πŸ˜ƒπŸ“Œ : https://medium.com/@liyafarahani/everything-about-neural-networks-for-beginners-234d2746c0c4

It is important to know that this project is very simple and based on minimal data , actually its nothing for learningπŸ˜‚ but if want to make better simple text generation you need to add more epochs and data for training and learning πŸ˜†πŸ˜πŸŽˆ

Code explaining πŸŽˆπŸ‘‡

The code πŸ‘¨β€πŸ’» is designed to generate predicted text πŸ“, which means it can create new sentences based on patterns it learns from a dataset of random sentences πŸ“Š. To do this, the code uses a special type of computer program called a neural network 🧠, which is based on how our brains work 🀯.

The first step is to clean up and prepare the data 🧹. This means getting rid of any unnecessary punctuation ❌, numbers πŸ”’, and special characters 🎭. Then, the code breaks the data into smaller chunks called "tokens" πŸ”‘, which are sequences of words πŸ“.

The neural network is then trained on this data using a combination of different layers πŸ€–, including Embedding, LSTM, and Dense layers. These layers help the neural network learn patterns in the data and make predictions about what words are likely to come next in a sentence πŸ€”.

Finally, the code uses a special function called gnr_txt to generate new sentences πŸš€. This function takes a starting phrase, called a "seed text" 🌱, and uses the neural network to predict what words should come next. The result is a brand new sentence that the code has never seen before! 😎

By using this code, you can create all kinds of new sentences and even entire paragraphs 🀩. It's a really cool way to explore language and see what the computer can come up with! πŸ€“

About

in this project i use tesorflow and python with an dataset from huging face to make smple text generation πŸ˜ƒπŸ€Œ. if like this project you can read some article about machine learning in my Medium account πŸ‘‡

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published