├── .gitignore ├── README.md ├── app.png ├── data ├── deploy │ ├── _index.md │ ├── community-cloud │ │ ├── _index.md │ │ ├── deploy-your-app │ │ │ ├── _index.md │ │ │ ├── app-dependencies.md │ │ │ └── secrets-management.md │ │ ├── get-started │ │ │ ├── _index.md │ │ │ ├── connect-github.md │ │ │ ├── create-your-account.md │ │ │ ├── explore-your-workspace.md │ │ │ ├── fork-and-edit.md │ │ │ ├── quickstart.md │ │ │ └── security-model.md │ │ ├── manage-your-account │ │ │ ├── _index.md │ │ │ ├── delete-your-account.md │ │ │ ├── manage-your-github-connection.md │ │ │ ├── sign-in-sign-out.md │ │ │ ├── update-your-email.md │ │ │ └── workspace-settings.md │ │ ├── manage-your-app │ │ │ ├── _index.md │ │ │ ├── app-analytics.md │ │ │ ├── app-settings.md │ │ │ ├── delete-your-app.md │ │ │ ├── edit-your-app.md │ │ │ ├── favorite-your-app.md │ │ │ └── reboot-your-app.md │ │ ├── share-your-app │ │ │ ├── _index.md │ │ │ ├── embed-your-app.md │ │ │ ├── indexability.md │ │ │ └── share-previews.md │ │ └── troubleshooting.md │ ├── concepts │ │ ├── _index.md │ │ ├── dependencies.md │ │ └── secrets.md │ └── tutorials │ │ ├── _index.md │ │ ├── docker.md │ │ └── kubernetes.md ├── develop │ ├── _index.md │ ├── api-reference │ │ ├── _index.md │ │ ├── caching-and-state │ │ │ ├── _index.md │ │ │ ├── cache-data.md │ │ │ ├── cache-resource.md │ │ │ ├── query_params.md │ │ │ └── session_state.md │ │ ├── charts │ │ │ ├── _index.md │ │ │ ├── altair_chart.md │ │ │ ├── area_chart.md │ │ │ ├── bar_chart.md │ │ │ ├── bokeh_chart.md │ │ │ ├── graphviz_chart.md │ │ │ ├── line_chart.md │ │ │ ├── map.md │ │ │ ├── plotly_chart.md │ │ │ ├── pydeck_chart.md │ │ │ ├── pyplot.md │ │ │ ├── scatter_chart.md │ │ │ └── vega_lite_chart.md │ │ ├── chat │ │ │ ├── _index.md │ │ │ ├── chat-input.md │ │ │ └── chat-message.md │ │ ├── command-line │ │ │ ├── _index.md │ │ │ └── run.md │ │ ├── configuration │ │ │ ├── _index.md │ │ │ ├── config-toml.md │ │ │ └── set_page_config.md │ │ ├── connections │ │ │ ├── _index.md │ │ │ ├── connection.md │ │ │ ├── connections-baseconnection.md │ │ │ ├── connections-snowflake.md │ │ │ ├── connections-snowpark.md │ │ │ ├── connections-sql.md │ │ │ ├── secrets-toml.md │ │ │ └── secrets.md │ │ ├── control-flow │ │ │ ├── _index.md │ │ │ ├── dialog.md │ │ │ ├── form.md │ │ │ ├── form_submit_button.md │ │ │ ├── fragment.md │ │ │ ├── rerun.md │ │ │ └── stop.md │ │ ├── custom-components │ │ │ ├── _index.md │ │ │ ├── declare_component.md │ │ │ ├── html.md │ │ │ └── iframe.md │ │ ├── data │ │ │ ├── _index.md │ │ │ ├── column_config │ │ │ │ ├── _index.md │ │ │ │ ├── areachartcolumn.md │ │ │ │ ├── barchartcolumn.md │ │ │ │ ├── checkboxcolumn.md │ │ │ │ ├── column.md │ │ │ │ ├── datecolumn.md │ │ │ │ ├── datetimecolumn.md │ │ │ │ ├── imagecolumn.md │ │ │ │ ├── linechartcolumn.md │ │ │ │ ├── linkcolumn.md │ │ │ │ ├── listcolumn.md │ │ │ │ ├── numbercolumn.md │ │ │ │ ├── progresscolumn.md │ │ │ │ ├── selectboxcolumn.md │ │ │ │ ├── textcolumn.md │ │ │ │ └── timecolumn.md │ │ │ ├── data_editor.md │ │ │ ├── dataframe.md │ │ │ ├── json.md │ │ │ ├── metric.md │ │ │ └── table.md │ │ ├── layout │ │ │ ├── _index.md │ │ │ ├── columns.md │ │ │ ├── container.md │ │ │ ├── empty.md │ │ │ ├── expander.md │ │ │ ├── popover.md │ │ │ ├── sidebar.md │ │ │ └── tabs.md │ │ ├── media │ │ │ ├── _index.md │ │ │ ├── audio.md │ │ │ ├── image.md │ │ │ └── video.md │ │ ├── navigation │ │ │ ├── _index.md │ │ │ └── switch_page.md │ │ ├── status │ │ │ ├── _index.md │ │ │ ├── balloons.md │ │ │ ├── error.md │ │ │ ├── exception.md │ │ │ ├── info.md │ │ │ ├── progress.md │ │ │ ├── snow.md │ │ │ ├── spinner.md │ │ │ ├── status.md │ │ │ ├── success.md │ │ │ ├── toast.md │ │ │ └── warning.md │ │ ├── testing │ │ │ ├── _index.md │ │ │ ├── st.testing.v1.AppTest.md │ │ │ └── testing_elements.md │ │ ├── text │ │ │ ├── _index.md │ │ │ ├── caption.md │ │ │ ├── code.md │ │ │ ├── divider.md │ │ │ ├── echo.md │ │ │ ├── header.md │ │ │ ├── latex.md │ │ │ ├── markdown.md │ │ │ ├── subheader.md │ │ │ ├── text.md │ │ │ └── title.md │ │ ├── utilities │ │ │ ├── _index.md │ │ │ ├── experimental-user.md │ │ │ ├── help.md │ │ │ └── html.md │ │ ├── widgets │ │ │ ├── _index.md │ │ │ ├── button.md │ │ │ ├── camera_input.md │ │ │ ├── checkbox.md │ │ │ ├── color_picker.md │ │ │ ├── date_input.md │ │ │ ├── download_button.md │ │ │ ├── file_uploader.md │ │ │ ├── link_button.md │ │ │ ├── multiselect.md │ │ │ ├── number_input.md │ │ │ ├── page_link.md │ │ │ ├── radio.md │ │ │ ├── select_slider.md │ │ │ ├── selectbox.md │ │ │ ├── slider.md │ │ │ ├── text_area.md │ │ │ ├── text_input.md │ │ │ ├── time_input.md │ │ │ └── toggle.md │ │ └── write-magic │ │ │ ├── _index.md │ │ │ ├── magic.md │ │ │ ├── write.md │ │ │ └── write_stream.md │ ├── concepts │ │ ├── _index.md │ │ ├── app-design │ │ │ ├── _index.md │ │ │ ├── animate-elements.md │ │ │ ├── button-behavior-and-examples.md │ │ │ ├── custom-classes.md │ │ │ ├── dataframes.md │ │ │ └── timezone-handling.md │ │ ├── app-testing │ │ │ ├── _index.md │ │ │ ├── automate-tests.md │ │ │ ├── beyond-the-basics.md │ │ │ ├── cheat-sheet.md │ │ │ ├── examples.md │ │ │ └── get-started.md │ │ ├── architecture │ │ │ ├── _index.md │ │ │ ├── app-chrome.md │ │ │ ├── architecture.md │ │ │ ├── caching.md │ │ │ ├── forms.md │ │ │ ├── fragments.md │ │ │ ├── old_caching.md │ │ │ ├── run-your-app.md │ │ │ ├── session-state.md │ │ │ └── widget-behavior.md │ │ ├── configuration │ │ │ ├── _index.md │ │ │ ├── https.md │ │ │ ├── options.md │ │ │ ├── static-file-serving.md │ │ │ └── theming.md │ │ ├── connections │ │ │ ├── _index.md │ │ │ ├── connecting-to-data.md │ │ │ ├── secrets-management.md │ │ │ └── security-reminders.md │ │ ├── custom-components │ │ │ ├── _index.md │ │ │ ├── components-api.md │ │ │ ├── create-component.md │ │ │ ├── limitations.md │ │ │ └── publish-component.md │ │ └── multipage-apps │ │ │ ├── _index.md │ │ │ └── page_directory.md │ ├── quick-references │ │ ├── _index.md │ │ ├── api-cheat-sheet.md │ │ ├── changelog.md │ │ └── prerelease-features.md │ └── tutorials │ │ ├── _index.md │ │ ├── databases │ │ ├── _index.md │ │ ├── aws-s3.md │ │ ├── bigquery.md │ │ ├── detabase.md │ │ ├── gcs.md │ │ ├── mongodb.md │ │ ├── mssql.md │ │ ├── mysql.md │ │ ├── postgresql.md │ │ ├── private-gsheet.md │ │ ├── public-gsheet.md │ │ ├── snowflake.md │ │ ├── supabase.md │ │ ├── tableau.md │ │ ├── tidb.md │ │ └── tigergraph.md │ │ ├── execution-flow │ │ ├── _index.md │ │ └── fragments │ │ │ ├── create-a-multiple-container-fragment.md │ │ │ ├── start-and-stop-fragment-auto-reruns.md │ │ │ └── trigger-a-full-script-rerun-from-a-fragment.md │ │ ├── llms │ │ ├── _index.md │ │ ├── conversational-apps.md │ │ └── llm-quickstart.md │ │ └── multipage-apps │ │ ├── _index.md │ │ └── custom-navigation.md ├── get-started │ ├── _index.md │ ├── fundamentals │ │ ├── _index.md │ │ ├── additional-features.md │ │ ├── advanced-concepts.md │ │ ├── main-concepts.md │ │ ├── summary.md │ │ └── tutorials │ │ │ ├── _index.md │ │ │ ├── create-a-multi-page-app.md │ │ │ └── create-an-app.md │ └── installation │ │ ├── _index.md │ │ ├── anaconda-distribution.md │ │ ├── cloud-quickstart.md │ │ ├── command-line.md │ │ └── sis.md ├── kb │ ├── FAQ │ │ ├── _index.md │ │ ├── create-anchor-link.md │ │ ├── enable-camera.md │ │ ├── how-download-file-streamlit.md │ │ ├── how-download-pandas-dataframe-csv.md │ │ ├── how-to-get-row-selections.md │ │ ├── insert-elements-out-of-order.md │ │ ├── pydeck-chart-custom-mapbox-styles.md │ │ ├── remove-streamlit-app-title.md │ │ ├── retrieve-filename-uploaded.md │ │ ├── sanity-checks.md │ │ ├── serializable-session-state.md │ │ ├── streamlit-watch-changes-other-modules-importing-app.md │ │ ├── supported-browsers.md │ │ ├── upgrade-version-streamlit.md │ │ ├── where-file-uploader-store-when-deleted.md │ │ ├── why-streamlit-restrict-nested-columns.md │ │ └── widget-updating-session-state.md │ ├── _index.md │ ├── dependencies │ │ ├── _index.md │ │ ├── install-package-pypi-github.md │ │ ├── libgl.md │ │ ├── module-not-found-error.md │ │ └── no-matching-distribution.md │ └── deployments │ │ ├── _index.md │ │ ├── authentication-without-sso.md │ │ ├── deploy-multiple-streamlit-apps-different-subdomains.md │ │ ├── deploy-streamlit-domain-port-80.md │ │ ├── does-streamlit-support-wsgi-protocol.md │ │ ├── how-to-submit-a-support-case-for-streamlit-community-cloud.md │ │ ├── huh-this-is-isnt-supposed-to-happen-message-after-trying-to-log-in.md │ │ ├── increase-upload-limit-cloud.md │ │ ├── invoking-python-subprocess-deployed-streamlit-app.md │ │ ├── login-attempt-to-streamlit-community-cloud-fails-with-error-403.md │ │ ├── organize-apps-workspaces.md │ │ ├── remote-start.md │ │ ├── resource-limits.md │ │ ├── unable-to-edit-or-delete-apps-in-streamlit-community-cloud-after-modifying-github-username.md │ │ ├── upgrade-streamlit-version.md │ │ └── view-only-access-to-app-after-changing-github-username-or-repository-name.md └── terms_definitions_tutorial.md ├── requirements.txt └── streamlit_app.py /.gitignore: -------------------------------------------------------------------------------- 1 | secrets.toml 2 | .streamlit/secrets.toml 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🦙📚 LlamaIndex - Chat with the Streamlit docs 2 | 3 | Build a chatbot powered by LlamaIndex that augments GPT 3.5 with the contents of the Streamlit docs (or your own data). 4 | 5 | ## Overview of the App 6 | 7 | 8 | 9 | - Takes user queries via Streamlit's `st.chat_input` and displays both user queries and model responses with `st.chat_message` 10 | - Uses LlamaIndex to load and index data and create a chat engine that will retrieve context from that data to respond to each user query 11 | 12 | ## Demo App 13 | 14 | [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://llamaindex-chat-with-docs.streamlit.app/) 15 | 16 | ## Get an OpenAI API key 17 | 18 | You can get your own OpenAI API key by following the following instructions: 19 | 1. Go to https://platform.openai.com/account/api-keys. 20 | 2. Click on the `+ Create new secret key` button. 21 | 3. Next, enter an identifier name (optional) and click on the `Create secret key` button. 22 | 4. Add your API key to your `secrets.toml` file. If you don't already have a `secrets.toml` file, add a folder named `.streamlit`, create a file called `secrets.toml` within the folder, and add the following to it: 23 | ``` openai_key = ``` 24 | 25 | Alternatively, you can use [Streamlit Community Cloud's secrets management feature](https://docs.streamlit.io/deploy/streamlit-community-cloud/deploy-your-app/secrets-management) to add your API key via the web interface. 26 | 27 | > [!CAUTION] 28 | > Don't commit your secrets file to your GitHub repository. The `.gitignore` file in this repo includes `.streamlit/secrets.toml` and `secrets.toml`. 29 | 30 | ## Try out the app 31 | 32 | Once the app is loaded, enter your question about the Streamlit library and wait for a response. 33 | -------------------------------------------------------------------------------- /app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carolinefrasca/llamaindex-chat-with-streamlit-docs/5b26c0258bca4208bf1f88c427a8c84d538df9a9/app.png -------------------------------------------------------------------------------- /data/deploy/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Deploy 3 | slug: /deploy 4 | --- 5 | 6 | # Deploy 7 | 8 | Get all the information you need to deploy your app and share it with your users. 9 | 10 | 11 | Understand the basics of app deployment. 17 | Deploy your app on our free platform and join a community of developers who share their apps around the world. 23 | Deploy your app in Snowflake for a secure, enterprise-grade environment. 29 | Learn how to deploy your app on a variety of platforms with our convenient collection of tutorials. 35 | 36 | -------------------------------------------------------------------------------- /data/deploy/community-cloud/get-started/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get started with Streamlit Community Cloud 3 | slug: /deploy/streamlit-community-cloud/get-started 4 | --- 5 | 6 | # Get started with Streamlit Community Cloud 7 | 8 | Welcome to Streamlit Community Cloud, where you can share your Streamlit apps with the world! Whether you've already created your first Streamlit app or you're just getting started, you're in the right place. 9 | 10 | First things first, you need to create your Streamlit Community Cloud account to start deploying apps. 11 | 12 | 13 | 20 | 27 | 34 | 35 | 36 | If you're looking for help to build your first Streamlit app, read our [Get started](/get-started) docs for the Streamlit library. If you want to fork an app and start with an example, check out our App gallery. Either way, it only takes a few minutes to create your first app. 37 | -------------------------------------------------------------------------------- /data/deploy/community-cloud/manage-your-account/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Manage your account 3 | slug: /deploy/streamlit-community-cloud/manage-your-account 4 | --- 5 | 6 | # Manage your account 7 | 8 | You can [Update your email](/deploy/streamlit-community-cloud/manage-your-account/update-your-email) or [Delete your account](/deploy/streamlit-community-cloud/manage-your-account/delete-your-account) entirely through [Workspace settings](/deploy/streamlit-community-cloud/manage-your-account/workspace-settings). 9 | 10 | When using Streamlit Community Cloud, you have two identities behind your account: a primary identity (Google or email) and source control (GitHub). Your primary identity allows other users to share private apps with you and grant you access to their analytics. Your source control identity allows you to deploy apps from GitHub repositories and manage them through your Streamlit Community Cloud workspace. 11 | 12 | ## Access your workspace settings 13 | 14 | To manage your account, sign in to share.streamlit.io and click "**Settings**" in the top right corner to access your workspace settings. 15 | 16 |
17 | Access your workspace settings from your workspace 18 |
19 | 20 | Learn more about how to [Update your email](/deploy/streamlit-community-cloud/manage-your-account/update-your-email) and [Delete your account](/deploy/streamlit-community-cloud/manage-your-account/delete-your-account). 21 | -------------------------------------------------------------------------------- /data/deploy/community-cloud/manage-your-account/delete-your-account.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete your account 3 | slug: /deploy/streamlit-community-cloud/manage-your-account/delete-your-account 4 | --- 5 | 6 | # Delete your account 7 | 8 | Deleting your Streamlit Community Cloud account is just as easy as creating it. When you delete your account, your information, account, and all your hosted apps are deleted as well. Read more about data deletion in [Streamlit trust and security](/deploy/streamlit-community-cloud/get-started/trust-and-security#data-deletion). 9 | 10 | 11 | 12 | Deleting your account is permanent and cannot be undone. Make sure you really want to delete your account and all hosted apps before proceeding. Any app you've deployed will be deleted, regardless of the workspace it was deployed from. 13 | 14 | 15 | 16 | ## How to delete your account 17 | 18 | Follow these steps to delete your account: 19 | 20 | 1. Sign in to Streamlit Community Cloud at share.streamlit.io and access your [Workspace settings](/deploy/streamlit-community-cloud/manage-your-account/workspace-settings). 21 | 22 | 2. From the "Linked accounts" section, click "**Delete account**". 23 | 24 |
25 | Delete your Streamlit Community Cloud account from your workspace settings 26 |
27 | 28 | 3. A confirmation will display. Enter the confirmation string and click "**Delete account forever**" 29 | 30 |
31 | Confirm your account deletion by typing the specified string 32 |
33 | 34 | 4. All your information and apps will be permanently deleted. 35 | ![Your Streamlit Community Cloud account has been deleted.](/images/streamlit-community-cloud/account-deleted.png) 36 | 37 | It's that simple! If you have any questions or run into issues deleting your account, please reach out to us on our forum. We're happy to help! 🎈 38 | -------------------------------------------------------------------------------- /data/deploy/community-cloud/manage-your-account/workspace-settings.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Workspace settings 3 | slug: /deploy/streamlit-community-cloud/manage-your-account/workspace-settings 4 | --- 5 | 6 | # Workspace settings 7 | 8 | From your workspace settings you can [Manage your account](/deploy/streamlit-community-cloud/manage-your-account), see your [App resources and limits](/deploy/streamlit-community-cloud/manage-your-app#app-resources-and-limits) and access support resources. 9 | 10 | ## Access your workspace settings 11 | 12 | From your workspace at share.streamlit.io, click "**Settings**" in the upper-right corner. 13 | 14 | ![Access your workspace settings](/images/streamlit-community-cloud/account-settings-header.png) 15 | 16 | ## Linked accounts 17 | 18 | The "**Linked accounts**" section shows your current primary identity and source control account. To learn more, see [Manage your account](/deploy/streamlit-community-cloud/manage-your-account). 19 | 20 | ![Manage your linked accounts in workspace settings](/images/streamlit-community-cloud/account-primary-identity-and-source-control.png) 21 | 22 | ## Limits 23 | 24 | The "**Limits**" section shows your current resources and limits. To learn more, see [App resources and limits](/deploy/streamlit-community-cloud/manage-your-app#app-resources-and-limits). 25 | 26 | ![Resource limits displayed in workspace settings](/images/streamlit-community-cloud/workspace-limits.png) 27 | 28 | ## Support 29 | 30 | The "**Support**" section provides a convenient list of useful resources so you know where to go for help. 31 | 32 | ![Support options available through workspace settings](/images/streamlit-community-cloud/workspace-support.png) 33 | -------------------------------------------------------------------------------- /data/deploy/community-cloud/manage-your-app/delete-your-app.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Delete your app 3 | slug: /deploy/streamlit-community-cloud/manage-your-app/delete-your-app 4 | --- 5 | 6 | # Delete your app 7 | 8 | If you need to delete your app, it's simple and easy. There are several cases where you may need to delete your app: 9 | 10 | - You have finished playing around with an example app. 11 | - You want to deploy from a private repository but already have a private app. 12 | - You want to change the Python version for your app or otherwise redeploy your app. 13 | 14 | If you delete your app and intend to immediately redploy it, your custom subdomain should be immediately available for reuse. Read more about data deletion in [Streamlit trust and security](/deploy/streamlit-community-cloud/get-started/trust-and-security#data-deletion). 15 | 16 | You can delete your app: 17 | 18 | - [From your workspace](#delete-your-app-from-your-workspace). 19 | - [From your Cloud logs](#delete-your-app-from-your-cloud-logs). 20 | 21 | ### Delete your app from your workspace 22 | 23 | 1. From your workspace at share.streamlit.io, click the overflow icon (more_vert) next to your app. Click "**Delete**". 24 | 25 | ![Delete your app from your workspace](/images/streamlit-community-cloud/workspace-app-delete.png) 26 | 27 | 2. A confirmation will display. Enter the required confirmation string and click "**Delete**". 28 | 29 |
30 | Confirm deleting your app from Streamlit Community Cloud 31 |
32 | 33 | ### Delete your app from your Cloud logs 34 | 35 | 1. From your app at `.streamlit.app`, click "**Manage app**" in the lower-right corner. 36 | 37 | ![Access Streamlit Community Cloud logs from your app](/images/streamlit-community-cloud/cloud-logs-open.png) 38 | 39 | 2. Click the overflow menu icon (more_vert) and click "**Delete app**". 40 | 41 | ![Delete your app from your Cloud logs](/images/streamlit-community-cloud/cloud-logs-menu-delete.png) 42 | 43 | 3. A confirmation will display. Enter the required confirmation string and click "**Delete**". 44 | 45 |
46 | Confirm deleting your app from Streamlit Community Cloud 47 |
48 | -------------------------------------------------------------------------------- /data/deploy/community-cloud/manage-your-app/favorite-your-app.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Favorite your app 3 | slug: /deploy/streamlit-community-cloud/manage-your-app/favorite-your-app 4 | --- 5 | 6 | # Favorite your app 7 | 8 | Streamlit Community Cloud supports a "favorite" feature that lets you quickly access your apps from your workspace. Favorited apps appear at the top of their workspace with a yellow star (star) beside them. You can favorite and unfavorite apps in any workspace to which you have access as a developer or invited viewer. 9 | 10 | ![Favorite apps appear on top in Streamlit Community Cloud](/images/streamlit-community-cloud/workspace-app-favorites-top.png) 11 | 12 | 13 | 14 | Favorites are specific to your account. Other members of your workspace cannot see which apps you have favorited. 15 | 16 | 17 | 18 | ## Favoriting and unfavoriting your app 19 | 20 | You can favorite your app: 21 | 22 | - [From your workspace](#favorite-your-app-from-your-workspace). 23 | - [From your app](#favorite-your-app-from-your-app-toolbar)! 24 | 25 | ### Favorite your app from your workspace 26 | 27 | 1. From your workspace at share.streamlit.io, click the overflow icon (more_vert) next to your app. Click "**Favorite**". 28 | 29 | ![Favorite your app from your workspace](/images/streamlit-community-cloud/workspace-app-favorite.png) 30 | 31 | 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. 32 | 33 | ![Favorited app in your workspace](/images/streamlit-community-cloud/workspace-app-favorited.png) 34 | 35 | - Once favorited, from the same menu, click "**Unfavorite**" to remove the star. 36 | 37 | ![Unfavorite your app from your workspace](/images/streamlit-community-cloud/workspace-app-unfavorite.png) 38 | 39 | 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.) 40 | 41 | ### Favorite your app from your app toolbar 42 | 43 | From your app at `.streamlit.app`, click the star (star_border/star) in the upper-right corner to toggle your app's favorite status. 44 | 45 | ![Favorite your app directly from your live app](/images/streamlit-community-cloud/favorite-select.png) 46 | -------------------------------------------------------------------------------- /data/deploy/community-cloud/manage-your-app/reboot-your-app.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Reboot your app 3 | slug: /deploy/streamlit-community-cloud/manage-your-app/reboot-your-app 4 | --- 5 | 6 | # Reboot your app 7 | 8 | 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. 9 | 10 | Rebooting your app on Streamlit Community Cloud is easy! You can reboot your app: 11 | 12 | - [From your workspace](#reboot-your-app-from-your-workspace). 13 | - [From your Cloud logs](#reboot-your-app-from-your-cloud-logs). 14 | 15 | ### Reboot your app from your workspace 16 | 17 | 1. From your workspace at share.streamlit.io, click the overflow icon (more_vert) next to your app. Click "**Reboot**". 18 | 19 | ![Reboot your app from your workspace](/images/streamlit-community-cloud/workspace-app-reboot.png) 20 | 21 | 2. A confirmation will display. Click "**Reboot**". 22 | 23 |
24 | Confirm rebooting your app in Streamlit Community Cloud 25 |
26 | 27 | ### Reboot your app from your Cloud logs 28 | 29 | 1. From your app at `.streamlit.app`, click "**Manage app**" in the lower-right corner. 30 | 31 | ![Access Streamlit Community Cloud logs from your app](/images/streamlit-community-cloud/cloud-logs-open.png) 32 | 33 | 2. Click the overflow menu icon (more_vert) and click "**Reboot app**". 34 | 35 | ![Reboot your app from your Cloud logs](/images/streamlit-community-cloud/cloud-logs-menu-reboot.png) 36 | 37 | 3. A confirmation will display. Click "**Reboot**". 38 | 39 |
40 | Confirm rebooting your app in Streamlit Community Cloud 41 |
42 | -------------------------------------------------------------------------------- /data/deploy/concepts/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Deployment concepts 3 | slug: /deploy/concepts 4 | --- 5 | 6 | # Deployment concepts 7 | 8 | Learn the fundamental concepts of app deployment. There are three main processes involved in deploying apps. 9 | 10 | - Install Python, Streamlit, and other dependencies in your deployment environment. 11 | - Securely handle your secrets and private information. 12 | - Remote start your app (`streamlit run`). 13 | 14 | If you're using Streamlit Community Cloud, we'll do most of the work for you! 15 | 16 | 17 | Understand the basics of configuring your deployment environment. 23 | Understand the basics of secret management. 29 | 30 | -------------------------------------------------------------------------------- /data/deploy/concepts/secrets.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Managing secrets when deploying your app 3 | slug: /deploy/concepts/secrets 4 | --- 5 | 6 | # Managing secrets when deploying your app 7 | 8 | If you are connecting to data sources or external services, you will likely be handling secret information like credentials or keys. Secret information should be stored and transmitted in a secure manner. When you deploy your app, ensure that you understand your platform's features and mechanisms for handling secrets so you can follow best practice. 9 | 10 | Avoid saving secrets directly in your code and keep `.gitignore` updated to prevent accidentally committing a local secret to your repository. For helpful reminders, see [Security reminders](/develop/concepts/connections/security-reminders). 11 | 12 | If you are using Streamlit Community Cloud, [Secrets management](/deploy/streamlit-community-cloud/deploy-your-app/secrets-management) allows you save environment variables and store secrets outside of your code. If you are using another platform designed for Streamlit, check if they have a built-in mechanism for working with secrets. In some cases, they may even support `st.secrets` or securely uploading your `secrets.toml` file. 13 | 14 | For information about using `st.connection` with environment variables, see [Global secrets, managing multiple apps and multiple data stores](/develop/concepts/connections/connecting-to-data#global-secrets-managing-multiple-apps-and-multiple-data-stores). 15 | -------------------------------------------------------------------------------- /data/deploy/tutorials/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Deployment tutorials 3 | slug: /deploy/tutorials 4 | --- 5 | 6 | # Deployment tutorials 7 | 8 | This sections contains step-by-step guides on how to deploy Streamlit apps to various cloud platforms and services. We have deployment guides for: 9 | 10 | 11 | 12 | 13 | screenshot 14 | 15 |
Streamlit Community Cloud
16 | 17 |
18 | 19 | 20 | 21 | screenshot 22 | 23 |
Docker
24 | 25 |
26 | 27 | 28 | 29 | screenshot 30 | 31 |
Kubernetes
32 | 33 |
34 |
35 | 36 | While we work on official Streamlit deployment guides for other hosting providers, here are some user-submitted tutorials for different cloud services: 37 | 38 | - [How to Deploy Streamlit to a Free **Amazon EC2** instance](https://towardsdatascience.com/how-to-deploy-a-streamlit-app-using-an-amazon-free-ec2-instance-416a41f69dc3), by Rahul Agarwal. 39 | - [Host Streamlit on **Azure**](https://towardsdatascience.com/deploying-a-streamlit-web-app-with-azure-app-service-1f09a2159743), by Richard Peterson. 40 | - [How to deploy Streamlit apps to **Google App Engine**](https://dev.to/whitphx/how-to-deploy-streamlit-apps-to-google-app-engine-407o), by [Yuichiro Tachibana (Tsuchiya)](https://discuss.streamlit.io/u/whitphx/summary). 41 | - [Host Streamlit on **Heroku**](https://towardsdatascience.com/quickly-build-and-deploy-an-application-with-streamlit-988ca08c7e83), by Maarten Grootendorst. 42 | - [Deploy Streamlit on **Ploomber Cloud**](https://docs.cloud.ploomber.io/en/latest/apps/streamlit.html), by Ido Michael. 43 | - [Host Streamlit on **21YunBox**](https://www.21yunbox.com/docs/#/deploy-streamlit), by Toby Lei. 44 | - [Community-supported deployment wiki](https://discuss.streamlit.io/t/streamlit-deployment-guide-wiki/5099). 45 | -------------------------------------------------------------------------------- /data/develop/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Develop 3 | slug: /develop 4 | --- 5 | 6 | # Develop 7 | 8 | Get all the information you need to build beautiful, performant web apps with Streamlit! 9 | 10 | 11 | Learn how Streamlit works with in-depth guides to our execution model and features. 17 | Learn about our API with function definitions and examples. 23 | Follow step-by-step instructions to build example apps and useful snippets. 29 | Check out our quick references for easy access to convenient information like our changelog, cheat sheet, pre-release features, and roadmap. 35 | 36 | -------------------------------------------------------------------------------- /data/develop/api-reference/charts/area_chart.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: st.area_chart 3 | slug: /develop/api-reference/charts/st.area_chart 4 | description: st.area_chart displays an area chart. 5 | --- 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /data/develop/api-reference/charts/bar_chart.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: st.bar_chart 3 | slug: /develop/api-reference/charts/st.bar_chart 4 | description: st.bar_chart displays a bar chart. 5 | --- 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /data/develop/api-reference/charts/bokeh_chart.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: st.bokeh_chart 3 | slug: /develop/api-reference/charts/st.bokeh_chart 4 | description: st.bokeh_chart displays an interactive Bokeh chart. 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /data/develop/api-reference/charts/graphviz_chart.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: st.graphviz_chart 3 | slug: /develop/api-reference/charts/st.graphviz_chart 4 | description: st.graphviz_chart displays a graph using the dagre-d3 library. 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /data/develop/api-reference/charts/line_chart.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: st.line_chart 3 | slug: /develop/api-reference/charts/st.line_chart 4 | description: st.line_chart displays a line chart. 5 | --- 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /data/develop/api-reference/charts/map.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: st.map 3 | slug: /develop/api-reference/charts/st.map 4 | description: st.map displays a map with points on it. 5 | --- 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /data/develop/api-reference/charts/pydeck_chart.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: st.pydeck_chart 3 | slug: /develop/api-reference/charts/st.pydeck_chart 4 | description: st.pydeck_chart displays a chart using the PyDeck library. 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /data/develop/api-reference/charts/pyplot.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: st.pyplot 3 | slug: /develop/api-reference/charts/st.pyplot 4 | description: st.pyplot displays a matplotlib.pyplot figure. 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /data/develop/api-reference/charts/scatter_chart.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: st.scatter_chart 3 | slug: /develop/api-reference/charts/st.scatter_chart 4 | description: st.scatter_chart displays an scatter chart. 5 | --- 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /data/develop/api-reference/charts/vega_lite_chart.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: st.vega_lite_chart 3 | slug: /develop/api-reference/charts/st.vega_lite_chart 4 | description: st.vega_lite_chart displays a chart using the Vega-Lite library. 5 | --- 6 | 7 | 8 | 9 | 10 | 11 | ### Theming 12 | 13 | Vega-Lite charts are displayed using the Streamlit theme by default. This theme is sleek, user-friendly, and incorporates Streamlit's color palette. The added benefit is that your charts better integrate with the rest of your app's design. 14 | 15 | The Streamlit theme is available from Streamlit 1.16.0 through the `theme="streamlit"` keyword argument. To disable it, and use Vega-Lite's native theme, use `theme=None` instead. 16 | 17 | Let's look at an example of charts with the Streamlit theme and the native Vega-Lite theme: 18 | 19 | ```python 20 | import streamlit as st 21 | from vega_datasets import data 22 | 23 | source = data.cars() 24 | 25 | chart = { 26 | "mark": "point", 27 | "encoding": { 28 | "x": { 29 | "field": "Horsepower", 30 | "type": "quantitative", 31 | }, 32 | "y": { 33 | "field": "Miles_per_Gallon", 34 | "type": "quantitative", 35 | }, 36 | "color": {"field": "Origin", "type": "nominal"}, 37 | "shape": {"field": "Origin", "type": "nominal"}, 38 | }, 39 | } 40 | 41 | tab1, tab2 = st.tabs(["Streamlit theme (default)", "Vega-Lite native theme"]) 42 | 43 | with tab1: 44 | # Use the Streamlit theme. 45 | # This is the default. So you can also omit the theme argument. 46 | st.vega_lite_chart( 47 | source, chart, theme="streamlit", use_container_width=True 48 | ) 49 | with tab2: 50 | st.vega_lite_chart( 51 | source, chart, theme=None, use_container_width=True 52 | ) 53 | ``` 54 | 55 | Click the tabs in the interactive app below to see the charts with the Streamlit theme enabled and disabled. 56 | 57 | 58 | 59 | If you're wondering if your own customizations will still be taken into account, don't worry! You can still make changes to your chart configurations. In other words, although we now enable the Streamlit theme by default, you can overwrite it with custom colors or fonts. For example, if you want a chart line to be green instead of the default red, you can do it! 60 | -------------------------------------------------------------------------------- /data/develop/api-reference/chat/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Chat elements 3 | slug: /develop/api-reference/chat 4 | --- 5 | 6 | # Chat elements 7 | 8 | Streamlit provides a few commands to help you build conversational apps. These chat elements are designed to be used in conjunction with each other, but you can also use them separately. 9 | 10 | `st.chat_message` lets you insert a chat message container into the app so you can display messages from the user or the app. Chat containers can contain other Streamlit elements, including charts, tables, text, and more. `st.chat_input` lets you display a chat input widget so the user can type in a message. Remember to check out `st.status` to display output from long-running processes and external API calls. 11 | 12 | 13 | 14 | 15 | screenshot 16 | 17 |

Chat input

18 | 19 | Display a chat input widget. 20 | 21 | ```python 22 | prompt = st.chat_input("Say something") 23 | if prompt: 24 | st.write(f"The user has sent: {prompt}") 25 | ``` 26 | 27 |
28 | 29 | 30 | screenshot 31 | 32 |

Chat message

33 | 34 | Insert a chat message container. 35 | 36 | ```python 37 | import numpy as np 38 | with st.chat_message("user"): 39 | st.write("Hello 👋") 40 | st.line_chart(np.random.randn(30, 3)) 41 | ``` 42 | 43 |
44 | 45 | 46 | screenshot 47 | 48 |

Status container

49 | 50 | Display output of long-running tasks in a container. 51 | 52 | ```python 53 | with st.status('Running'): 54 | do_something_slow() 55 | ``` 56 | 57 |
58 | 59 | 60 |

st.write_stream

61 | 62 | Write generators or streams to the app with a typewriter effect. 63 | 64 | ```python 65 | st.write_stream(my_generator) 66 | st.write_stream(my_llm_stream) 67 | ``` 68 | 69 |
70 |
71 | -------------------------------------------------------------------------------- /data/develop/api-reference/chat/chat-input.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: st.chat_input 3 | slug: /develop/api-reference/chat/st.chat_input 4 | description: st.chat_input displays a chat input widget. 5 | --- 6 | 7 | 8 | 9 | Read the [Build a basic LLM chat app](/develop/tutorials/llms/build-conversational-apps) tutorial to learn how to use `st.chat_message` and `st.chat_input` to build chat-based apps. 10 | 11 | 12 | 13 | 14 | 15 | For an overview of the `st.chat_input` and `st.chat_message` API, check out this video tutorial by Chanin Nantasenamat ([@dataprofessor](https://www.youtube.com/dataprofessor)), a Senior Developer Advocate at Streamlit. 16 | 17 | 18 | -------------------------------------------------------------------------------- /data/develop/api-reference/chat/chat-message.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: st.chat_message 3 | slug: /develop/api-reference/chat/st.chat_message 4 | description: st.chat_message inserts a chat message container into the app. 5 | --- 6 | 7 | 8 | 9 | Read the [Build a basic LLM chat app](/develop/tutorials/llms/build-conversational-apps) tutorial to learn how to use `st.chat_message` and `st.chat_input` to build chat-based apps. 10 | 11 | 12 | 13 | 14 | 15 | For an overview of the `st.chat_message` and `st.chat_input` API, check out this video tutorial by Chanin Nantasenamat ([@dataprofessor](https://www.youtube.com/dataprofessor)), a Senior Developer Advocate at Streamlit. 16 | 17 | 18 | -------------------------------------------------------------------------------- /data/develop/api-reference/command-line/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Command-line options 3 | slug: /develop/api-reference/cli 4 | --- 5 | 6 | # Command-line interface 7 | 8 | When you install Streamlit, a command-line (CLI) tool gets installed 9 | as well. The purpose of this tool is to run Streamlit apps, change Streamlit configuration options, 10 | and help you diagnose and fix issues. 11 | 12 | To see all of the supported commands: 13 | 14 | ```bash 15 | streamlit --help 16 | ``` 17 | 18 | ### Run Streamlit apps 19 | 20 | ```bash 21 | streamlit run your_script.py [-- script args] 22 | ``` 23 | 24 | Runs your app. At any time you can stop the server with **Ctrl+c**. 25 | 26 | 27 | 28 | When passing your script some custom arguments, **they must be passed after 29 | two dashes**. Otherwise the arguments get interpreted as arguments to Streamlit 30 | itself. 31 | 32 | 33 | 34 | To see the Streamlit 'Hello, World!' example app, run `streamlit hello`. 35 | 36 | ### View Streamlit version 37 | 38 | To see what version of Streamlit is installed, just type: 39 | 40 | ```bash 41 | streamlit version 42 | ``` 43 | 44 | ### View documentation 45 | 46 | ```bash 47 | streamlit docs 48 | ``` 49 | 50 | Opens the Streamlit documentation (i.e. this website) in a web browser. 51 | 52 | ### Clear cache 53 | 54 | ```bash 55 | streamlit cache clear 56 | ``` 57 | 58 | Clears persisted files from the on-disk [Streamlit cache](/develop/api-reference/caching-and-state), if 59 | present. 60 | 61 | ### View all configuration options 62 | 63 | As described in [Configuration](/develop/concepts/configuration), Streamlit has several 64 | configuration options. To view them all, including their current values, just type: 65 | 66 | ```bash 67 | streamlit config show 68 | ``` 69 | -------------------------------------------------------------------------------- /data/develop/api-reference/command-line/run.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: streamlit run 3 | slug: /develop/api-reference/cli/run 4 | --- 5 | 6 | ## `$ streamlit run` 7 | 8 | ### Syntax 9 | 10 | ``` 11 | streamlit run [-- config options] [script args] 12 | ``` 13 | 14 | ### Arguments 15 | 16 | ``: The path to your entrypoint file for your Streamlit app. Your entrypoint file is your app's homepage. 17 | 18 | ### Options 19 | 20 | Configuration options are passed in the form of `--
.