Zhus on First

(deep learning) deploying your model using huggingface and gradio

Step 1: Train your model

To setup your local computer to train the model, refer to my previous blog post. Otherwise, check out my Google Colab notebook which you can copy and use to train your own model. Mine is a debugged and updated version from Fast.ai's course anyways. I have some comments in the code that document my journey.

Step 2: Setting up HuggingFace Space with Gradio

Fast.ai's lesson 2, as discussed by Jeremy here, touches on model sharing. Here are additional steps to link your local setup with HuggingFace for seamless Git operations:

Step 3: Create web app

Now it’s time to use your trained model in a deployed web app. You can see all my code here—just click on ā€œFilesā€ in the top right:

Starting here in the video, Jeremy walks through using a Jupyter notebook to generate an app.py. Here’s his HuggingFace Spaces using his Dog v. Cat model. If you’re curious, I figured out that the URLs.PETS is a link to a standard image library of dogs and cats that this call references:

image: screenshot of Jupyter notebook about URLs.PETS call

Steps:

Step 4: Make a website

Posts with tag "deep-learning"

#deep-learning