Is it possible to run apps off of non-main branches in a Space?
Loving Spaces (with Gradio) for sharing and evaluating models!AFAICT, there’s no way to run an app that can be backed by a branch other than main – there’s no documented configuration choice nor is there a branch option on the App tab of the Space. I tried it with thehello world demo here. I haven’t tried with Streamlit yet.Am I missing something? It’d be great to be able to host/demo different versions of the same model (e.g. throughout training, throughout model development) and use the  branch level (or even commit level!) to organize those demos, rather than the repo level.
2022-05-19T09:40:50Z
Hi@charlesfrye,Thanks for your interest in Spaces.Running an app on a branch other than themainbranch is currently not supported in Spaces.We’re taking this feedback into account.(Don’t hesitate to have a look at thechangelog)
2022-05-19T10:23:31Z
While not the same as organising with branches, if the aim is just to run a different version you can create a separate Space and push to both from the same local repository.For example, if the git URL of this secondary Space washttps://huggingface.co/spaces/charlesfrye/demo-secondary, you could add it as an extra remote with:git remote add secondary https://huggingface.co/spaces/charlesfrye/demo-secondary
git push secondary mainAfter which you can push tooriginor push tosecondarydepending on the changes you want reflected in each Space. Note that you may need to--forceorrebasepushes and pulls if the two repos become out of sync.I understand this approach is at the repo level but hopefully it offers a potential workaround.