StreamlitCloud is a powerful platform for deploying and sharing your data science and machine learning projects. With its easy-to-use interface and seamless integration with popular tools like GitHub, it’s a great choice for building and deploying your projects. However, if you’re working with a private GitHub package, you may run into some difficulties when trying to deploy to StreamlitCloud. In this article, we’ll walk you through the steps of installing your own private GitHub package on StreamlitCloud.
Step 1 : Create a Personal Access Token (PAT) on GitHub
On Github ,“Developer settings” in the left sidebar, then click on “Personal access tokens”. Generate new token” button.copy it safe as we cant create the token twice.
Step2: Add the PAT to StreamlitCloud:-Go to your StreamlitCloud dashboard and add your PAT .
Step 3: Update Your requirements.txt
File
# requirements.txt
numpy==1.19.5
git+https://github.com/prrasad/learning_streamlit.git
Step 4: Deploy Your App
Now that everything is set up, you can deploy your app to StreamlitCloud. To do this, follow these steps:
- In your StreamlitCloud dashboard, click on “Deploy a new app” in the top-right corner of the page.
- Select your GitHub repository and branch.
- Click the “Deploy” button at the bottom of the page.
- Wait for the deployment to finish.