A demo of how to create a Hugging Face Space with gradio within a nbdev project.
This is a toy python library that lets you obtain the size of any Hugging Face dataset. For example, we can check the size of tglcourse/CelebA-faces-cropped-128 like so:
from nbdev_spaces_demo import hfsize
hfsize("tglcourse/CelebA-faces-cropped-128")
'5.49 GB'
We deploy this function using Gradio and Hugging Face spaces.
Gradio and Hugging Face spaces is one of the easiest way to create and host apps. Gradio also allows you to prototype these apps in notebooks, which is excellent!
We show you step-by-step instructions on how to deploy a Hugging Face gradio app from a notebook in this example.