Making an AI to do my English Assignments for me using PyTorch.
Making an AI to do my English Assignments for me using PyTorch.
Honestly who likes to write essays they are long they need loads of research and framing them is never fun. So, one day I thought lets make a work around.So, I made an AI to do my work for me.
Without delay lets get started hehe😁
Firstly you will need a PyTorch build. Here is my build below:
After PyTorch is done installing. Start installing ‘transformers’ using the following command:
pip install transformers
Now all the imports are done.
Lets get started with the main code, Lets start with importing the pre-trained model:
Now lets load in the model:
here for the model, instead of using EleutherAI/gpt-neo-2.7B
, you can replace the 2.7B with 1.3B or 125M, so it will run faster on your computer.
Finally the last step using the model.
you can specify the max length if you want to.
With that our code is over yeah literally 6 lines of code.
Lets see some fun outputs:
Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation:
Bob the builder the famous builder, the man who had built the world’s first skyscraper in 1885; and that it was the architect who invented the modern elevator—the world’s first underground transportation system.
So, as you can see its pretty good at its stuff.
If you liked it a follow will be appreciated.
This project was executed on Google Colaboratory check the code out:
If you wanna make your very own AI/Chatbot made with TensorFlow read this article by me:
Firstly lets get started with the imports:-medium.com
For more stuff check out my GitHub:
You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…github.com
For my day to day AIML research updates follow me in twitter:
Thanks for reading 😁,See you guys next week.