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 πππ
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! π€