Programmatically Gradio Deployment to HuggingFace Spaces

I’ve been working with Gradio and HuggingFace Spaces and observed that the process to programmatically deploy Gradio to HuggingFace Spaces could be more streamlined. I was wondering if there’s any ongoing work or future plans to simplify this integration? It would be beneficial for developers looking to seamlessly integrate these two powerful tools.

Thank you for your assistance and looking forward to the community’s insights!

1 Like

Hi @yachty66 !

Gradio comes with a deploy command you can use to create a huggingface space from the command line. You can use it like gradio deploy.

There’s also this github action to synch from a github repo to HF: GitHub - nateraw/huggingface-sync-action: GitHub action that'll sync files from a GitHub Repo with the Hugging Face Hub 🤗

1 Like

i saw both options. it would still be helpful if there was an api for that to do it from a python script, for example, like you can create a github repository with the github api.

oh wait. should be actually possible. just creating a repo programmatically and than pushing app.py + related files to the repo.