Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.78 KB

python-text-summarization-and-gradio.md

File metadata and controls

25 lines (16 loc) · 1.78 KB

Deploying Python Functions As Web-Apps Using Gradio

Details:

Outcome: Learn how to deploy Python functions using Gradio (a pip-installed Python library to easily deploy functions to a live web-app, accessible anywhere, see image below). Meanwhile, you'll learn the basics of Python :)

image

Requirements: Google Colab Access (comes free with Google/Gmail account)

Language used: Python

Customization opportunity: There's a lot! You'll have a choice to which python function you want to deploy (shown as main in the image above), whether it be a "simple" calculator that adds two numbers, or as complicated as a text summarizer or computer vision model, you can deploy all of that with Gradio. Additionally, the user-input type can easily be changed (text box in the image above): from text input to radio selects, to dropdowns, to images, to files, you can upload anything to the web-app. Additionally, one can customize the title, descriptions, example inputs of the gradio interface easily as well.

Platform Limitations: Browser based Google Colab, so available on all platforms.

Time estimation: 60 minutes

Breakdown

  • Part 0: Get everyone onto Google Colab (5 mins)
  • Part 1: basics/cool functionality of Python (if-statements, functions, API calls, etc) (15 mins)
  • Part 2: Give everyone 15 minutes to code out a Python function of their chioce (15 mins)
  • Part 3: Deploy this using Gradio, and explain various gradio input types (text, image, file, radio-select, etc) (15 mins)
  • Part 4 (extension): If you want a permanent deployed link (longer than the default 72 hours), deploy your Gradio model to HuggingFace in the terminal. (10 mins)
  • Hooray!!! Now you've got a working Gradio app!