Gradio tutorial with Hugging Face Spaces deployment

Please reference this blog post on how to use this notebook.

Install dependencies

Make an app with Gradio


size

 size (repo:str)

Returns the size in GB of a HuggingFace Dataset.

!echo $HF_ENDPOINT
https://hf-mirror.com
size("tglcourse/CelebA-faces-cropped-128")
'5.49 GB'
# this is only necessary in a notebook
iface.close()
Closing server running on port: 7860

Create a requirements.txt file

fastcore
Overwriting ../requirements.txt

Convert this notebook into a Gradio app

# from nbdev.export import nb_export
# nb_export('01_gradio.ipynb', lib_path='.', name='gradio')