Share app url without sharing the files and version
Hi Community!I just want to share the URL of my application without sharing theFiles and versionson Huggingface spaces. Is there any way to achieve this?
2022-11-17T22:49:29Z
Hi@Kunal7!Is this for gradio or streamlit? To be clear, you’d like to share your space without people being able to read it’s source code?
2022-11-18T04:07:12Z
I’ve a streamlit app that I’d like to host on huggingface spaces without people being able to read the source code. Is it possible to do so?
2022-11-18T07:35:02Z
Hi@freddyaboulton!Thanks for the response. I am trying to deploy my app on streamlit.To be clear, you’d like to share your space without people being able to read its source code?Yes, exactly. This is what I intend to do
2022-11-18T18:27:44Z
Thanks for the clarification@Kunal7and@anon15932797! There isn’t a built in solution for this at the moment. Will bring this up with the team!
2022-11-18T19:45:30Z
@Kunal7and@anon15932797one thing you could do is clone a private repo from your app.py file and import your demo from there. I’ve seen that with gradio demos it might work with streamlit!Can you please explain your use case a bit more? How come you’d like to keep the code private?
2022-11-20T19:39:29Z
That is actually a great idea, one can use that with fine-granular personal access token(PAT).Create a PAT from GitHub with Content read access and use it as a password.Basically, the link will becomehttps://YOUR_USERNAME:YOUR_PAT_TOKEN@github.com/YOUR_USERNAME/YOUR_REPOSITORY_NAME.gitIt is not possible to use ssh(port 22)because only ports 80 and 443 are allowed.Then, by using thegitpythonlibrary,  the repository can be downloaded from the inside of the python scriptAnother way would be using SSH over HTTPS, I tried and learned a lot about underlying containers, I would be happy if anyone would like to try that.
2022-11-24T15:34:33Z
I’ve created a PAT from Github with content read access and followed the other instructions. However I couldn’t figure out how to use gitpython, could you elaborate on this? I’ve triedgit.Repo.clone_from()function and also tried usingpygit2package.
2022-11-24T18:17:29Z
After installing gitpython, you can import it:from git import RepoAnd using clone_from()Repo.clone_from("https://YOUR_USERNAME:YOUR_PAT_TOKEN@github.com/YOUR_USERNAME/YOUR_REPOSITORY_NAME.git", 
    "/repo_directory")I assume you know putting your PAT Token to secrets and calling it from environment variables. Otherwise someone can read your private repository. The following document structure is expected:your_huggingface_repo/
  app.py
  README.py
  repo_directory/
    inside_code.pyAfter downloading the repo:import repo_directory.inside_code as inside_codeshould be the last step.
2022-11-25T05:51:25Z
I’ve followed these steps and it works with default values, but whenever I make a different selection from drop-down it’s throwing an errorGitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git clone -v https://*****:*****@github.com/TracingInsights/Charts.git repo_directory stderr: 'fatal: destination path 'repo_directory' already exists and is not an empty directory. 'My huggingface space is at:F1 Analysis - a Hugging Face Space by tracinginsightsMy streamlit app is at:https://tracinginsights.streamlit.app/
2023-03-29T13:02:03Z
Hi there, currently I’m in a position where I need to hide my code but I do wan’t to share the streamlit app. Did you manage to get it working, and if yes, how did you solve this last drop-down error?
2023-03-29T18:57:34Z
hi@BobvanVeen, I’ve recently responded to same same question here, please let me know if that helps you, otherwise I’m happy to helpEmbedding Spaces with auth for public models counter-intuitive?SpacesHello@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 herGradio Docs. 


To hide …
2023-04-20T13:10:23Z
Hi everyone! I’ve got a gradio app hosted on HuggingFace Spaces that I’m using to collect data from different users on HuggingFace Datasets. However, I don’t want to expose the code to the users. How can I achieve that?
2023-08-30T22:40:44Z
Hi@radamesI’ve tried using gr.load() to load my sreamlit app from a private space but I get ValueError: Could not load the Space. Is there a workaround for streamlit apps?
2023-08-30T23:15:25Z
Hi@aannor, unfortunately, all these tricks only work for Gradio apps asgr.load()is an exclusive design considering Spaces infra. I’m not familiar with any tricks to overcome this with Streamlit. Perhaps@whitphxknows of a trick?
2023-09-22T08:25:15Z
Unfortunately I don’t have any idea on it… ALAIKgr.load()only works with Gradio Spaces (and Model repos).
2023-12-28T06:40:04Z
Just don’t recreate the directory if it already existsif os.path.exists('./repo'):
    pass
else:
    Repo.clone_from(st.secrets['GIT_URL'],'./repo')
2024-06-21T01:34:47Z
Maybe embed?Embed your Space in another website
2024-10-02T09:27:47Z
Hi@freddyaboultonNo solution yet?
2024-10-02T10:02:09Z
This is probably the same problem asthe problem of wanting to use a private Space from the outside but passing a token does not help.I think it was only a few months ago, but I couldn’t find a solution then.I thought maybe they dared to turn it off to prevent people from just riding on HF’s server resources… but if that’s not the case from HF’s point of view, then there’s a demand for it.
No date available
No reply text available