diff --git a/content/kb/tutorials/llm/index.md b/content/kb/tutorials/llm/index.md index a96ccbcb2..33c5f6370 100644 --- a/content/kb/tutorials/llm/index.md +++ b/content/kb/tutorials/llm/index.md @@ -4,11 +4,12 @@ slug: /knowledge-base/tutorials/llm-quickstart --- # LLM quickstart + ## OpenAI, LangChain, and Streamlit in 18 lines of code In this tutorial, you will build a Streamlit LLM app that can generate text from a user-provided prompt. This Python app will use the LangChain framework and Streamlit. Optionally, you can deploy your app to [Streamlit Community Cloud](https://streamlit.io/cloud) when you're done. -*This tutorial is adapted from a blog post by Chanin Nantesanamat: [LangChain tutorial #1: Build an LLM-powered app in 18 lines of code](https://blog.streamlit.io/langchain-tutorial-1-build-an-llm-powered-app-in-18-lines-of-code/).* +_This tutorial is adapted from a blog post by Chanin Nantesanamat: [LangChain tutorial #1: Build an LLM-powered app in 18 lines of code](https://blog.streamlit.io/langchain-tutorial-1-build-an-llm-powered-app-in-18-lines-of-code/)._ @@ -75,49 +76,49 @@ To start, create a new Python file and save it as `streamlit_app.py` in the roo 1. Import the necessary Python libraries. - ```python - import streamlit as st - from langchain.llms import OpenAI - ``` + ```python + import streamlit as st + from langchain.llms import OpenAI + ``` 2. Create the app's title using `st.title`. - ```python - st.title('🦜🔗 Quickstart App') - ``` + ```python + st.title('🦜🔗 Quickstart App') + ``` 3. Add a text input box for the user to enter their OpenAI API key. - ```python - openai_api_key = st.sidebar.text_input('OpenAI API Key', type='password') - ``` + ```python + openai_api_key = st.sidebar.text_input('OpenAI API Key', type='password') + ``` 4. Define a function to authenticate to OpenAI API with the user's key, send a prompt, and get an AI-generated response. This function accepts the user's prompt as an argument and displays the AI-generated response in a blue box using `st.info`. - ```python - def generate_response(input_text): - llm = OpenAI(temperature=0.7, openai_api_key=openai_api_key) - st.info(llm(input_text)) - ``` + ```python + def generate_response(input_text): + llm = OpenAI(temperature=0.7, openai_api_key=openai_api_key) + st.info(llm(input_text)) + ``` 5. Finally, use `st.form()` to create a text box (`st.text_area()`) for user input. When the user clicks `Submit`, the `generate-response()` function is called with the user's input as an argument. - ```python - with st.form('my_form'): - text = st.text_area('Enter text:', 'What are the three key pieces of advice for learning how to code?') - submitted = st.form_submit_button('Submit') - if not openai_api_key.startswith('sk-'): - st.warning('Please enter your OpenAI API key!', icon='⚠') - if submitted and openai_api_key.startswith('sk-'): - generate_response(text) - ``` + ```python + with st.form('my_form'): + text = st.text_area('Enter text:', 'What are the three key pieces of advice for learning how to code?') + submitted = st.form_submit_button('Submit') + if not openai_api_key.startswith('sk-'): + st.warning('Please enter your OpenAI API key!', icon='⚠') + if submitted and openai_api_key.startswith('sk-'): + generate_response(text) + ``` 6. Remember to save your file! 7. Return to your computer's terminal to run the app. - ```bash - streamlit run streamlit_app.py - ``` + ```bash + streamlit run streamlit_app.py + ``` ## Deploying the app @@ -125,14 +126,14 @@ To deploy the app to the Streamlit Cloud, follow these steps: 1. Create a GitHub repository for the app. Your repository should contain two files: - ``` - your-repository/ - ├── streamlit_app.py - └── requirements.txt - ``` + ``` + your-repository/ + ├── streamlit_app.py + └── requirements.txt + ``` 1. Go to [Streamlit Community Cloud](http://share.streamlit.io), click the `New app` button from your workspace, then specify the repository, branch, and main file path. Optionally, you can customize your app's URL by choosing a custom subdomain. -2. Click the `Deploy!` button. +1. Click the `Deploy!` button. Your app will now be deployed to Streamlit Community Cloud and can be accessed from around the world! 🌎 diff --git a/content/library/advanced-features/advanced-widget-behavior.md b/content/library/advanced-features/advanced-widget-behavior.md index 5fd1437f5..f20ad918e 100644 --- a/content/library/advanced-features/advanced-widget-behavior.md +++ b/content/library/advanced-features/advanced-widget-behavior.md @@ -1,16 +1,180 @@ --- -title: Widget semantics -slug: /library/advanced-features/widget-semantics +title: Widget behavior +slug: /library/advanced-features/widget-behavior --- -# Advanced notes on widget behavior +# Understanding widget behavior -Widgets are magical and often work how you want. But they can have surprising behavior in some situations. Here is a high-level, abstract description of widget behavior, including some common edge-cases: +Widgets are magical and often work how you want. But they can have surprising behavior in some situations. Understanding the different parts of a widget and the precise order in which events occur is helpful for achieving desired results. -1. If you call a widget function before the widget state exists, the widget state defaults to a value. This value depends on the widget and its arguments. -2. A widget function call returns the current widget state value. The return value is a simple Python type, and the exact type depends on the widget and its arguments. -3. Widget states depend on a particular session (browser connection). The actions of one user do not affect the widgets of any other user. -4. A widget's identity depends on the arguments passed to the widget function. If those change, the call will create a new widget (with a default value, per 1). -5. If you don't call a widget function in a script run, we neither store the widget state nor render the widget. If you call a widget function with the same arguments later, Streamlit treats it as a new widget. +## Anatomy of a widget -4 and 5 are the most likely to be surprising and may pose a problem for some application designs. When you want to persist widget state for recreating a widget, use [Session State](/library/api-reference/session-state) to work around 5. +There are four parts to every widget: + +1. The frontend component as seen by the user. +2. The backend value or value as seen through `st.session_state`. +3. The return value given by the widget's function. +4. The key of the widget used to access its value via `st.session_state`. + +### Session dependence + +These parts are dependent on a particular session (browser connection). The actions of one user do not affect the widgets of any other user. Furthermore, if a user opens up multiple tabs to access an app, then each tab will be a unique session. Hence, changing a widget in one tab will not affect the same widget in another tab. + +### Data types + +The backend value (as seen through `st.session_state`) and the return value of a widget are of simple Python types. For example, `st.button` returns a boolean value and will have the same boolean value saved in `st.session_state`. + +### Widget keys + +Widget keys serve two purposes: + +1. Distinguishing two otherwise identical widgets. +2. Creating a means to access and manipulate the widget's value through + `st.session_state`. + +A widget's identity depends on the arguments passed to the widget function. If you have two widgets of the same type with the same arguments, you will get a `DuplicateWidgetID` error. In this case, you will need to assign unique keys to the two widgets. + +### Persistence + +If a widget's function is not called during a script run, then none of its parts will be retained, including its value in `st.session_state`. If you have assigned a key to a widget and you navigate away from that widget, its key and associated value in `st.session_state` will be deleted. Even temporarily hiding a widget will cause it to reset when it reappears; Streamlit will treat it like a new widget. + +### Statefulness + +As long as the defining parameters of a widget remain the same and that widget is continuously rendered on the frontend, then it will be stateful. If any of the defining parameters of a widget change, Streamlit will see it as a new widget and it will reset. The use of manually assigned keys and default values is particularly important in this case. + +In this example, we have a slider with whose min and max values are changed. Try setting values on the slider and changing the min or max values to see how each behaves. + +```python +import streamlit as st + +cols = st.columns([2,1,2]) +minimum = cols[0].number_input('Minimum', 1, 5) +maximum = cols[2].number_input('Maximum', 6, 10, 10) + +st.slider('No default, no key', minimum, maximum) + +st.slider('With default, no key', minimum, maximum, value=5) + +st.slider('No default, with key', minimum, maximum, key='a') + +st.slider('With default, with key', minimum, maximum, value=5, key='b') +``` + +#### No default, no key + +As soon as the min or max value is changed, the slider will reset to the minimum value. The changing of the min or max value makes it a "new" widget from Streamlit's perspective and so it is recreated with the default value equal to the minimum value since it is not defined otherwise. + +#### With default, no key + +As with the previous case, a change to the min or max value will result in the widget being seen as "new" and thus recreated. Since a default value of 5 is defined, the widget will reset to 5 whenever the min or max is changed. + +#### No default, with key + +This is closer to expected behavior. Since the widget has a key, Streamlit has a way of reconnecting the state of the widget even with a change in min or max value that would otherwise make the widget be treated as "new." In this case, the change in min and max does cause the widget to be reconstructed, but the existence of the key in `st.session_state` with an assigned value causes the new widget's state to be overwritten from its otherwise default value. This example is not perfect though; try this: + +1. Set the slider to a value of 10. +2. Reduce the max to 9. +3. See the slider still appear to have a value of 10. +4. Set the slider to a value less than 10. +5. See the max of the slider update to 9. + The value of the slider in `st.session_state` can become invalid if the current selection becomes out-of-range through an update of min or max. A corrected example follows this one. + +#### With default, with key + +This is a tricky case. The default value and key are at odds.The default value trumps the value in `st.session_state` and the slider behaves the same as "With default, no key." As before, a change in min or max value results in a "new" widget. If you create a new widget with both a default value and a key, one of two things will happen: + +1. The key was associated to another widget from the previous script run and the new widget with load with the default value. +2. The key was not associated to another widget from the previous script run and the new widget will load with the value assigned to the key (with a warning if it's different than the default value). + +#### Best practice + +Generally speaking, if you will be dynamically modifying a widget, stick to using a key and don't assign the default value through the optional parameter. Here is an exapanded example to handle this case: + +```python +import streamlit as st + +# Set default value +if 'a' not in st.session_state: + st.session_state.a = 5 + +cols = st.columns(2) +minimum = cols[0].number_input('Min', 1, 5, key='min') +maximum = cols[1].number_input('Max', 6, 10, 10, key='max') + +def update_value(): + st.session_state.a = min(st.session_state.a, maximum) + st.session_state.a = max(st.session_state.a, minimum) + +# Validate the slider value before rendering +update_value() +st.slider('A', minimum, maximum, key='a') +``` + +## Order of operations + +When a user interacts with a widget, the order of logic is: + +1. Its value in `st.session_state` is updated. +2. The callback function (if any) is executed. +3. The page reruns, with the widget function returning its new value. + +If the callback function writes anything to the screen, that content will appear above the rest of the page. A callback function runs as a prefix to the page reloading. Consequently, that means anything written via a callback function will disappear as soon as the user performs their next action. Other widgets should generally not be created within a callback function. + + + +If a callback function is passed any args or kwargs, those arguments will be established when the widget is rendered. In particular, if you want to use a widget's new value in its own callback function, you cannot pass that value to the callback function via the `args` parameter; you will have to assign a key to the widget and look up its new value using a call to `st.session_state` _within the callback function_. + + + +[//]: # "TODO: simple example and form example" + +## Life cycle + +When a widget function is called, Streamlit will check if it already has a widget with the same parameters. Streamlit will reconnect if it thinks the widget already exists. Otherwise, it will make a new one. + +Streamlit identifies widgets as "being the same" based on their construction parameters: labels, min or max values, default values, placeholder texts, help text, and keys are all used by Streamlit to identify a widget. On the other hand, callback functions, callback args and kwargs, disabling options, and label visibility do not affect a widget's identity. + +### Calling a widget function when the widget doesn't already exist + +1. Streamlit will build the frontend and backend parts of the widget. +2. If the widget has been assigned a key, Streamlit will check if that key already exists in session state. + a. If it exists and is not currently associated to another widget, Streamlit will attach to that key and take on its value for the widget. + b. Otherwise, it will assign the default value to the key in `st.session_state`. +3. If there are args or kwargs for a callback function, they are computed and saved at this point in time. +4. The default value is then returned by the function. + +Step 2 can be tricky. If you have a widget: + +```python +st.number_input('Alpha',key='A') +``` + +and you change it on a page rerun to: + +```python +st.number_input('Beta',key='A') +``` + +Streamlit will see that as a new widget because of the label change. The key `'A'` will be considered part of the widget labeled `'Alpha'` and will not be attached as-is to the new widget labeled `'Beta'`. Streamlit will destroy `st.session_state.A` and recreate it with the default value. + +If a widget attaches to a pre-existing key when created and is also manually assigned a default value, you will get a warning if there is a disparity. If you want to control a widget's value through `st.session_state`, initialize the widget's value through `st.session_state` and avoid the default value argument to prevent conflict. + +[//]: # "TODO: simple example and multipage example" + +### Calling a widget function when the widget already exists + +1. Streamlit will connect to the existing frontend and backend parts. +2. If the widget has a key that was deleted from `st.session_state`, then Streamlit will recreate the key using the current frontend value. (e.g Deleting a key will not revert the widget to a default value.) +3. It will return the current value of the widget. + +[//]: # "TODO: Examples with the key copy workaround and pseudo key workflow" + +### Cleaning up + +When Streamlit gets to the end of a page run, it will delete the data for any widgets it has in memory that were not rendered on the screen. Most importantly, that means Streamlit will delete all key-value pairs in `st.session_state` associated to a widget not currently on screen. + +If you navigate away from a widget with some key `'my_key'` and save data to `st.session_state.my_key` on the new page, you will interrupt the widget cleanup process and prevent the key-value pair from being deleted. The rest of the widget will still be deleted and you will be left with an unassociated key-value in `st.session_state`. To preserve a widget's data, you can do something as trivial as resaving the key at the top of every page: + +```python +st.session_state.my_key = st.session_state.my_key +``` diff --git a/content/library/advanced-features/dataframes.md b/content/library/advanced-features/dataframes.md index 048ddbdbd..4076d0d55 100644 --- a/content/library/advanced-features/dataframes.md +++ b/content/library/advanced-features/dataframes.md @@ -276,9 +276,9 @@ if st.button('Get results'): In addition to column configuration, `st.dataframe` and `st.data_editor` have a few more parameters to customize the display of your dataframe. -* `hide_index` : Set to `True` to hide the dataframe's index. -* `column_order` : Pass a list of column labels to specify the order of display. -* `disabled` : Pass a list of column labels to disable them from editing. This let's you avoid disabling them individually. +- `hide_index` : Set to `True` to hide the dataframe's index. +- `column_order` : Pass a list of column labels to specify the order of display. +- `disabled` : Pass a list of column labels to disable them from editing. This let's you avoid disabling them individually. ## Handling large datasets diff --git a/content/library/advanced-features/index.md b/content/library/advanced-features/index.md index cfe19180a..b65a91c0d 100644 --- a/content/library/advanced-features/index.md +++ b/content/library/advanced-features/index.md @@ -138,9 +138,9 @@ Working with timezones can be tricky. This section provides a high-level descrip - + -##### Advanced notes on widget behavior +##### Understanding widget behavior Widgets are magical and often work how you want. But they can have surprising behavior in some situations. This section provides is a high-level, abstract description of widget behavior, including some common edge-cases. diff --git a/content/library/changelog.md b/content/library/changelog.md index 4cf3c45fa..c1a844a0c 100644 --- a/content/library/changelog.md +++ b/content/library/changelog.md @@ -654,7 +654,7 @@ _Release date: Sep 22, 2021_ - 💅 We updated our UI to a more polished look with a new font. - 🎨 We now support `theme.base` in the theme object when it's sent to custom components. - 🧠 We've modified session state to reset widgets if any of their arguments changed even if they provide a key. - - Some widget behavior may have changed, but we believe this change makes the most sense. We have added a section to [our documentation](/library/advanced-features/widget-semantics) describing how they behave. + - Some widget behavior may have changed, but we believe this change makes the most sense. We have added a section to [our documentation](/library/advanced-features/widget-behavior) describing how they behave. **Other Changes** diff --git a/content/streamlit-cloud/deploy-your-app/secrets-management.md b/content/streamlit-cloud/deploy-your-app/secrets-management.md index 57a9d5d54..66ed4c6d9 100644 --- a/content/streamlit-cloud/deploy-your-app/secrets-management.md +++ b/content/streamlit-cloud/deploy-your-app/secrets-management.md @@ -93,9 +93,9 @@ If you need to add or edit your secrets for an app that is already deployed, you 2. Click the overflow menu icon (more_vert) for your app. 3. Click "**Settings**". ![Access your app settings from your workspace](/images/streamlit-community-cloud/workspace-app-settings.png) -3. A modal will appear. Click "**Secrets**" on the left. +4. A modal will appear. Click "**Secrets**" on the left. ![Access your secrets through your app settings](/images/streamlit-community-cloud/workspace-app-settings-secrets.png) -4. After you edit your secrets, click "**Save**". It might take a minute for the update to be propagated to your app, but the new values will be reflected when the app re-runs. +5. After you edit your secrets, click "**Save**". It might take a minute for the update to be propagated to your app, but the new values will be reflected when the app re-runs. ### Develop locally with secrets diff --git a/content/streamlit-cloud/get-started/create-your-account.md b/content/streamlit-cloud/get-started/create-your-account.md index 1d8384b72..07c5f2efb 100644 --- a/content/streamlit-cloud/get-started/create-your-account.md +++ b/content/streamlit-cloud/get-started/create-your-account.md @@ -14,9 +14,10 @@ Streamlit Community Cloud accounts have two underlying identities: primary and s ## Sign up Although you can begin the sign-up process with GitHub, we recommend starting with Google or email in order to have a complete account from the start. -* [Step 1: Primary identity](#step-1-primary-identity) (Google or email) -* [Step 2: Source control](#step-2-source-control) (GitHub) -* [Step 3: Set up your account](#step-3-set-up-your-account) + +- [Step 1: Primary identity](#step-1-primary-identity) (Google or email) +- [Step 2: Source control](#step-2-source-control) (GitHub) +- [Step 3: Set up your account](#step-3-set-up-your-account) ### Step 1: Primary identity diff --git a/content/streamlit-cloud/manage-your-account/manage-your-github-connection.md b/content/streamlit-cloud/manage-your-account/manage-your-github-connection.md index 65aa4735c..649f4dcf2 100644 --- a/content/streamlit-cloud/manage-your-account/manage-your-github-connection.md +++ b/content/streamlit-cloud/manage-your-account/manage-your-github-connection.md @@ -9,12 +9,12 @@ If you did not connect GitHub when you created your account or need to correct y If you are not fully logged in and authorized to both a primary identity (Google or email) and source control (GitHub), there will be a warning symbol in the upper-right corner of your workspace. This can mean one of three things: -* You are not signed in to a primary identity (Google or email). - * See [Connect Google to your account](/streamlit-community-cloud/manage-your-account/update-your-email#connect-google-to-your-account). -* You are not signed in to source control (GitHub.) - * See [Connecting GitHub to an existing primary identity](#connecting-github-to-an-existing-primary-identity). -* Your source control has incomplete permissions. - * Access your workspace settings see [Authorize Streamlit to access private repositories](#authorize-streamlit-to-access-private-repositories). +- You are not signed in to a primary identity (Google or email). + - See [Connect Google to your account](/streamlit-community-cloud/manage-your-account/update-your-email#connect-google-to-your-account). +- You are not signed in to source control (GitHub.) + - See [Connecting GitHub to an existing primary identity](#connecting-github-to-an-existing-primary-identity). +- Your source control has incomplete permissions. + - Access your workspace settings see [Authorize Streamlit to access private repositories](#authorize-streamlit-to-access-private-repositories). Authorize your GitHub account @@ -25,8 +25,7 @@ If you created your account without connecting GitHub or if you disconnected Git 1. Click "**Settings**" in the upper-right corner of your workspace. 2. If you do not have GitHub connected, a warning is displayed saying, "**You are not signed in with a source control account**". - If instead you see "**Streamlit does not have access to private repos on this GitHub account**" skip to step 5. -3. Click "**Sign in with GitHub**". +If instead you see "**Streamlit does not have access to private repos on this GitHub account**" skip to step 5. 3. Click "**Sign in with GitHub**".
Sign in with GitHub to connect GitHub to your Streamlit Community Cloud account diff --git a/content/streamlit-cloud/manage-your-account/sign-in-sign-out.md b/content/streamlit-cloud/manage-your-account/sign-in-sign-out.md index 1e0804e2f..bc606f2fd 100644 --- a/content/streamlit-cloud/manage-your-account/sign-in-sign-out.md +++ b/content/streamlit-cloud/manage-your-account/sign-in-sign-out.md @@ -13,15 +13,15 @@ Once you've created your account, you can sign in to share.streamlit.io and click "**Continue with Google**". -
- Sign in to Streamlit Community Cloud with Google -
+
+ Sign in to Streamlit Community Cloud with Google +
2. Enter your Google account credentials. -
- Enter your Google credentials to sign in to Streamlit Community Cloud -
+
+ Enter your Google credentials to sign in to Streamlit Community Cloud +
3. If your account is already linked to GitHub, you may be immediately prompted to sign in with GitHub. Once you have signed in, you can [Explore your workspace!](/streamlit-community-cloud/get-started/explore-your-workspace). 🎈 @@ -35,9 +35,9 @@ Once you've created your account, you can sign in to -
+
+ GitHub sign-in +
3. Once you have signed in to GitHub, you can [Explore your workspace!](/streamlit-community-cloud/get-started/explore-your-workspace). 🎈 @@ -45,23 +45,23 @@ Once you've created your account, you can sign in to
share.streamlit.io and enter the email you used to create your Streamlit Community Cloud account. Click "**Continue with email**". -
- Email sign-in -
+
+ Email sign-in +
2. You will see a confirmation message asking you to check your email. -
- Email sign-in -
+
+ Email sign-in +
3. Check your inbox for an email with the subject "**Sign in to Streamlit Cloud**". Click the link in the email to sign in to Streamlit Community Cloud. Note that this link will expire in 15 minutes and can only be used once. -
- Email sign-in -
+
+ Email sign-in +
-3. Once you click the link in your email, you can [Explore your workspace!](/streamlit-community-cloud/get-started/explore-your-workspace). 🎈 +4. Once you click the link in your email, you can [Explore your workspace!](/streamlit-community-cloud/get-started/explore-your-workspace). 🎈 ## Sign out of your account @@ -69,4 +69,4 @@ From your workspace, click on your workspace name in the upper-right corner. Cli
Sign out of Streamlit Community Cloud -
\ No newline at end of file + diff --git a/content/streamlit-cloud/manage-your-app/app-analytics.md b/content/streamlit-cloud/manage-your-app/app-analytics.md index 8e486cef8..03da4e9da 100644 --- a/content/streamlit-cloud/manage-your-app/app-analytics.md +++ b/content/streamlit-cloud/manage-your-app/app-analytics.md @@ -6,17 +6,19 @@ slug: /streamlit-community-cloud/manage-your-app/app-analytics # App analytics Streamlit Community Cloud allows you to see the viewership of each of your apps. Specifically, you can see: -* The total viewers count of your app (counted from April 2022). -* The most recent unique viewers (capped up to your last 20 viewers). -* A relative timestamp of each unique viewer's last visit. + +- The total viewers count of your app (counted from April 2022). +- The most recent unique viewers (capped up to your last 20 viewers). +- A relative timestamp of each unique viewer's last visit. ![App analytics on Streamlit Community Cloud](/images/streamlit-community-cloud/workspace-app-analytics-viewers.png) ## Access your app analytics You can get to your app's analytics: -* [From your workspace](#access-app-analytics-from-your-workspace). -* [From your Cloud logs](#access-app-analytics-from-your-cloud-logs). + +- [From your workspace](#access-app-analytics-from-your-workspace). +- [From your Cloud logs](#access-app-analytics-from-your-cloud-logs). ### Access app analytics from your workspace @@ -50,7 +52,7 @@ For public apps, we anonymize all viewers outside your workspace to protect thei -When you invite a viewer to an app, they gain access to analytics as well. Additionally, if someone is invited as a viewer to *any* app in your workspace, they can see analytics for all public apps in your workspace and invite additional viewers themselves. A viewer in your workspace may see the emails of developers and other viewers in your workspace through analytics. +When you invite a viewer to an app, they gain access to analytics as well. Additionally, if someone is invited as a viewer to _any_ app in your workspace, they can see analytics for all public apps in your workspace and invite additional viewers themselves. A viewer in your workspace may see the emails of developers and other viewers in your workspace through analytics. diff --git a/content/streamlit-cloud/manage-your-app/app-settings.md b/content/streamlit-cloud/manage-your-app/app-settings.md index 678bd5a6e..fbee13c3f 100644 --- a/content/streamlit-cloud/manage-your-app/app-settings.md +++ b/content/streamlit-cloud/manage-your-app/app-settings.md @@ -12,8 +12,9 @@ If you access "**Settings**" from your [App menu](/library/advanced-features/app ## Access your app settings You can get to your app's settings: -* [From your workspace](#access-app-settings-from-your-workspace). -* [From your Cloud logs](#access-app-settings-from-your-cloud-logs). + +- [From your workspace](#access-app-settings-from-your-workspace). +- [From your Cloud logs](#access-app-settings-from-your-cloud-logs). ### Access app settings from your workspace @@ -34,16 +35,19 @@ Click the overflow menu icon (share.streamlit.io, click the overflow icon (more_vert) next to your app. Click "**Delete**". - ![Delete your app from your workspace](/images/streamlit-community-cloud/workspace-app-delete.png) + ![Delete your app from your workspace](/images/streamlit-community-cloud/workspace-app-delete.png) 2. A confirmation will display. Enter the required confirmation string and click "**Delete**". -
- Confirm deleting your app from Streamlit Community Cloud -
+
+Confirm deleting your app from Streamlit Community Cloud +
### Delete your app from your Cloud logs 1. From your app at `.streamlit.app`, click "**Manage app**" in the lower-right corner. - ![Access Streamlit Community Cloud logs from your app](/images/streamlit-community-cloud/cloud-logs-open.png) + ![Access Streamlit Community Cloud logs from your app](/images/streamlit-community-cloud/cloud-logs-open.png) 2. Click the overflow menu icon (more_vert) and click "**Delete app**". - ![Delete your app from your Cloud logs](/images/streamlit-community-cloud/cloud-logs-menu-delete.png) + ![Delete your app from your Cloud logs](/images/streamlit-community-cloud/cloud-logs-menu-delete.png) 3. A confirmation will display. Enter the required confirmation string and click "**Delete**". -
- Confirm deleting your app from Streamlit Community Cloud -
+
+Confirm deleting your app from Streamlit Community Cloud +
diff --git a/content/streamlit-cloud/manage-your-app/favorite-your-app.md b/content/streamlit-cloud/manage-your-app/favorite-your-app.md index 57a24acf8..5f0cb873a 100644 --- a/content/streamlit-cloud/manage-your-app/favorite-your-app.md +++ b/content/streamlit-cloud/manage-your-app/favorite-your-app.md @@ -18,22 +18,23 @@ Favorites are specific to your account. Other members of your workspace cannot s ## Favoriting and unfavoriting your app You can favorite your app: -* [From your workspace](#favorite-your-app-from-your-workspace). -* [From your app](#favorite-your-app-from-your-app-toolbar)! + +- [From your workspace](#favorite-your-app-from-your-workspace). +- [From your app](#favorite-your-app-from-your-app-toolbar)! ### Favorite your app from your workspace 1. From your workspace at share.streamlit.io, click the overflow icon (more_vert) next to your app. Click "**Favorite**". - ![Favorite your app from your workspace](/images/streamlit-community-cloud/workspace-app-favorite.png) + ![Favorite your app from your workspace](/images/streamlit-community-cloud/workspace-app-favorite.png) 2. Your favorited app will move to the top of your list (with other favorited apps if you have them) and display with a yellow star. - ![Favorited app in your workspace](/images/streamlit-community-cloud/workspace-app-favorited.png) + ![Favorited app in your workspace](/images/streamlit-community-cloud/workspace-app-favorited.png) -* Once favorited, from the same menu, click "**Unfavorite**" to remove the star. +- Once favorited, from the same menu, click "**Unfavorite**" to remove the star. - ![Unfavorite your app from your workspace](/images/streamlit-community-cloud/workspace-app-unfavorite.png) + ![Unfavorite your app from your workspace](/images/streamlit-community-cloud/workspace-app-unfavorite.png) Alternatively, you can favorite and unfavorite apps by clicking directly on the star next to their names. (Hover over an unfavorited app to reveal an empty star icon next to its name.) diff --git a/content/streamlit-cloud/manage-your-app/reboot-your-app.md b/content/streamlit-cloud/manage-your-app/reboot-your-app.md index ae897ac36..eff459a79 100644 --- a/content/streamlit-cloud/manage-your-app/reboot-your-app.md +++ b/content/streamlit-cloud/manage-your-app/reboot-your-app.md @@ -8,33 +8,34 @@ slug: /streamlit-community-cloud/manage-your-app/reboot-your-app If you need to clear your app's memory or force a fresh build after modifying a file that Streamlit Community Cloud doesn't monitor, you may need to reboot your app. This will interrupt any user who may currently be using your app and may take a few minutes for your app to re-deploy. Anyone visiting your app will see "Your app is in the oven" during a reboot. Rebooting your app on Streamlit Community Cloud is easy! You can reboot your app: -* [From your workspace](#reboot-your-app-from-your-workspace). -* [From your Cloud logs](#reboot-your-app-from-your-cloud-logs). + +- [From your workspace](#reboot-your-app-from-your-workspace). +- [From your Cloud logs](#reboot-your-app-from-your-cloud-logs). ### Reboot your app from your workspace 1. From your workspace at share.streamlit.io, click the overflow icon (more_vert) next to your app. Click "**Reboot**". - ![Reboot your app from your workspace](/images/streamlit-community-cloud/workspace-app-reboot.png) + ![Reboot your app from your workspace](/images/streamlit-community-cloud/workspace-app-reboot.png) 2. A confirmation will display. Click "**Reboot**". -
- Confirm rebooting your app in Streamlit Community Cloud -
+
+Confirm rebooting your app in Streamlit Community Cloud +
### Reboot your app from your Cloud logs 1. From your app at `.streamlit.app`, click "**Manage app**" in the lower-right corner. - ![Access Streamlit Community Cloud logs from your app](/images/streamlit-community-cloud/cloud-logs-open.png) + ![Access Streamlit Community Cloud logs from your app](/images/streamlit-community-cloud/cloud-logs-open.png) 2. Click the overflow menu icon (more_vert) and click "**Reboot app**". - ![Reboot your app from your Cloud logs](/images/streamlit-community-cloud/cloud-logs-menu-reboot.png) + ![Reboot your app from your Cloud logs](/images/streamlit-community-cloud/cloud-logs-menu-reboot.png) 3. A confirmation will display. Click "**Reboot**". -
- Confirm rebooting your app in Streamlit Community Cloud -
+
+Confirm rebooting your app in Streamlit Community Cloud +
diff --git a/content/streamlit-cloud/share-your-app/embed-your-app.md b/content/streamlit-cloud/share-your-app/embed-your-app.md index 234af99f2..d11a02a4c 100644 --- a/content/streamlit-cloud/share-your-app/embed-your-app.md +++ b/content/streamlit-cloud/share-your-app/embed-your-app.md @@ -84,7 +84,7 @@ The only noteworthy differences between the methods is that iframing allows you ## Embed options -When [Embedding with iframes](#embedding-with-iframes), Streamlit allows you to specify one or more instances of the `?embed_options` query parameter for granular control over the embedding behavior. +When [Embedding with iframes](#embedding-with-iframes), Streamlit allows you to specify one or more instances of the `?embed_options` query parameter for granular control over the embedding behavior. Both `?embed` and `?embed_options` are invisible to [`st.experimental_get_query_params`](/library/api-reference/utilities/st.experimental_get_query_params) and [`st.experimental_set_query_params`](/library/api-reference/utilities/st.experimental_set_query_params). The former ignores the embed query parameters and does not return them, while the latter disallows setting embed query parameters. diff --git a/python/api-examples-source/st-experimental-connection/README.md b/python/api-examples-source/st-experimental-connection/README.md index 40038f251..9b1df89cd 100644 --- a/python/api-examples-source/st-experimental-connection/README.md +++ b/python/api-examples-source/st-experimental-connection/README.md @@ -1,2 +1,3 @@ # release-demos + A demo app for Streamlit release highlights :star2: