You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: streamlit_demo_apps/README.md
+12-11Lines changed: 12 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
1
# Deploying Streamlit Apps
2
2
3
-
Follow the steps to deploy a live Streamlit app for your Nada program and test file. The app will connect to the Nillion Testnet to store your Nada program, store secret inputs (or use computation time secrets), and run blind computation.
3
+
Follow the steps to deploy a live Streamlit app for your Nada program. The app will connect to the Nillion Testnet to store your Nada program, store secret inputs (or use computation time secrets), and run blind computation.
4
4
5
5
## How to add a new Streamlit App
6
6
7
-
### 0. Create a streamlit secrets file
7
+
### 0. Fork this repo
8
+
9
+
### 1. Create a streamlit secrets file
8
10
9
11
Run this command to create a `.streamlit/secrets.toml` copied from the example.
Add your Nilchain private key to the .streamlit/secrets.toml file. The private key must be linked to a funded Nillion Testnet address that was created using a Google account (not a mnemonic). This allows you to retrieve the private key from Keplr. If you don’t have a Testnet wallet yet, you can learn how to create one here: https://docs.nillion.com/testnet-guides
16
18
17
-
### 1. Run the script to generate a new streamlit app for your program
19
+
### 2. Run the script to generate a new streamlit app for your program
18
20
19
21
From the root folder of this repo, run the generate-streamlit-app script:
20
22
21
23
```
22
24
python3 generate-streamlit-app.py
23
25
```
24
26
25
-
### 2. Follow the prompts to
27
+
### 3. Follow the prompts to
26
28
27
29
- Select an existing program (from the src/ directory)
28
30
- Select an existing yaml test file for your program (from the tests/ directory)
29
31
30
-
This will generate a Streamlit app file: streamlit_demo_apps/app_[your_program_name].py. The script will run the Streamlit app locally with this command
32
+
This will generate a Streamlit app file: streamlit*demo_apps/app*[your_program_name].py. The script will run the Streamlit app locally with this command
31
33
32
34
```
33
35
streamlit run streamlit_demo_apps/app_[your_program_name].py`
34
36
```
35
37
36
-
### 3. Test your Streamlit app locally
38
+
### 4. Test your Streamlit app locally
37
39
38
40
View the app in your browser to make sure everything works as expected.
39
41
40
-
### 4. Commit your code to GitHub
42
+
### 5. Commit your code to GitHub
41
43
42
44
Add and commit your new streamlit app code to your forked Github repo. (Code must be connected to a remote, open source GitHub repository to deploy a Streamlit app.)
43
45
@@ -51,8 +53,7 @@ Once you've committed the open source code, you can click the "deploy" button wi
51
53
52
54
<imgwidth="1000"alt="Streamlit Community Cloud"src="https://github.com/user-attachments/assets/74a70b4e-506c-41df-8d59-f949871c9a4e">
53
55
54
-
55
-
### 5. Deploy your app from Streamlit.io
56
+
### 6. Deploy your app from Streamlit.io
56
57
57
58
When you click "Deploy Now" from your local app, you'll be taken to streamlit.io and asked to log in with Github to create a new Streamlit app. Set the main file path to your new app `streamlit_demo_apps/app_[your_program_name].py`
0 commit comments