Skip to content

Latest commit

 

History

History
18 lines (10 loc) · 2.06 KB

README.md

File metadata and controls

18 lines (10 loc) · 2.06 KB

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! 🤓