Hello @EtheE, thank you for your feedback. We have received similar requests in the past, we might implement a solution it in the future. However, we have previously suggested different workarounds depending on the specific use case:
-
To hide sensitive source code on Space, you can create a private Space and a second public Space which only loads the private Space using the ‘gr.Interface.load()’ method. This method can load a Space even if it is private. Check more her Gradio Docs.
-
To hide specific files only, you can create a private dataset/model and use the ‘huggingface_hub’ client to load your dataset/model using the hub token via Space settings.
-
You can also use our Inference Endpoints PaaS service which is fully integrated with HF tools and our hub. This service provides a way to deploy a Space as a REST API. You can learn more about it here Inference Endpoints - Hugging Face