-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
56 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
import streamlit as st | ||
|
||
from st_pages import add_page_title | ||
|
||
add_page_title() | ||
|
||
st.write("This is just a sample page!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
import streamlit as st | ||
|
||
from st_pages import add_page_title | ||
|
||
add_page_title() | ||
|
||
st.write("This is just a sample page!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
import streamlit as st | ||
|
||
from st_pages import add_page_title | ||
|
||
add_page_title() | ||
|
||
st.write("This is just a sample page!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
import streamlit as st | ||
|
||
from st_pages import add_page_title | ||
|
||
add_page_title() | ||
|
||
st.write("This is just a sample page!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import streamlit as st | ||
|
||
"# A Better way to Set Up Multi-Page Streamlit Apps" | ||
# "# A Better way to Set Up Multi-Page Streamlit Apps" | ||
|
||
with st.echo("above"): | ||
from st_pages import Page, show_pages | ||
with st.echo("below"): | ||
from st_pages import Page, add_page_title, show_pages | ||
|
||
add_page_title() # Optional method to add title and icon to current page | ||
|
||
show_pages( | ||
[ | ||
Page("example_app/streamlit_app.py", "Home", "🏠"), | ||
Page( | ||
"example_app/example_one.py", "Example One", ":books:" | ||
), # Can use :<icon-name>: or the actual icon | ||
Page( | ||
"example_app/example_four.py", "Example Four", "📖" | ||
), # The pages appear in the order you pass them | ||
# Can use :<icon-name>: or the actual icon | ||
Page("example_app/example_one.py", "Example One", ":books:"), | ||
# The pages appear in the order you pass them | ||
Page("example_app/example_four.py", "Example Four", "📖"), | ||
Page("example_app/example_two.py", "Example Two", "✏️"), | ||
Page( | ||
"example_app/example_three.py" | ||
), # Will use the default icon and name based on the page name | ||
# Will use the default icon and name based on the filename if you don't | ||
# pass them | ||
Page("example_app/example_three.py"), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters