2 min read

New Course: Create a Text Generation Web App with 100% Python

Learn how to implement and train GPT-Neo. Then, learn how to create a web app with 100% Python to demonstrate the model.
New Course: Create a Text Generation Web App with 100% Python

I just launched my first course on Udmey! The primary purpose of this course is to provide the students with a solid understanding of how to create and train text generation Transformer models. The course also covers how to create a web app using 100% Python to demonstrate GPT-Neo. There is no installation required for this course, which means you can get straight to training and deploying state-of-the-art NLP models after purchasing it.

View the course here

Screenshot of final web-page

Sections

Run GPT-Neo

This section covers how to set up and use GPT-Neo (and GPT-2) with Happy Transformer. I also explain the theory behind three common text generation algorithms: Greedy, Generic Sampling and Top-k Sampling and how to apply them.

Train GPT-Neo

This section covers how to fine-tune GPT-Neo with just a few lines of code. It also explains basic theory behind three different learning parameters and how adjusting them may impact fine-tuning performance.

Mini-Project

This is a fun section! In this section, I cover how to fine-tune a GPT-Neo model to generate legal bills. For example, given the input "Requires" the output is "the Secretary of Agriculture to establish a program to provide the purchase of land for the development of a farm or livestock facility..." Two Python packages are discussed in this section Hugging Face's datasets library and Happy Transformer and. By completing this section, you'll gain a solid understanding on how to fetch training data and how to train Transformer models.

Create a Web App with 100% Python

In this section, I cover how to create a web app using a service called Anvil. Anvil allows us to create a front-end using a simple drag and drop interface. Then, we can program the front-end logic code using Python. We can also connect it quite easily to a Google Colab notebook using a Python package. This way, we can run our model on a GPU.

Deploy

Finally, I cover how to deploy the web app. Unlike Google Colab, Paperspace does no have auto shutdown times but still uses a Jupternook like environment. So, we cover how to host our model on Paperpsace and connect it to Anvil. Then, we cover how to publish the web app to a public URL.

Conclusion

Whether you're just learning about NLP or are an expert practitioner, I think you'll gain a lot from completing the course. You should be able to follow along so long that you understand basic Python syntax.  I hope you all enjoy the course!

Link to course

Book a Call

We may be able to help you or your company with your next NLP project. Feel free to book a free 15 minute call with us.