From 6d6f63b1bbfeac91fda1ba7eefcaeff74f021d3c Mon Sep 17 00:00:00 2001 From: hysts Date: Thu, 10 Jul 2025 13:10:06 +0000 Subject: [PATCH 01/13] Update spaces-config-reference.md to remove streamlit SDK --- docs/hub/spaces-config-reference.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/hub/spaces-config-reference.md b/docs/hub/spaces-config-reference.md index 6e3e981c8..e4f804a97 100644 --- a/docs/hub/spaces-config-reference.md +++ b/docs/hub/spaces-config-reference.md @@ -17,16 +17,15 @@ Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gr Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray). **`sdk`** : _string_ -Can be either `gradio`, `streamlit`, `docker`, or `static`. +Can be either `gradio`, `docker`, or `static`. **`python_version`**: _string_ Any valid Python `3.x` or `3.x.x` version. Defaults to `3.10`. **`sdk_version`** : _string_ -Specify the version of the selected SDK (Streamlit or Gradio). +Specify the version of Gradio to use. All versions of Gradio are supported. -All versions of Streamlit from `0.79.0` are supported. **`suggested_hardware`** : _string_ Specify the suggested [hardware](https://huggingface.co/docs/hub/spaces-gpus) on which this Space must be run. @@ -46,7 +45,7 @@ Setting this value will not automatically assign a permanent storage to this Spa Value must be one of `"small"`, `"medium"` or `"large"`. **`app_file`** : _string_ -Path to your main application file (which contains either `gradio` or `streamlit` Python code, or `static` html code). +Path to your main application file (which contains either `gradio` Python code or `static` html code). Path is relative to the root of the repository. **`app_build_command`** : _string_ From 2a55340abbe60a2ddd072cec50c465b177c444e9 Mon Sep 17 00:00:00 2001 From: hysts Date: Thu, 10 Jul 2025 13:14:43 +0000 Subject: [PATCH 02/13] Update spaces-overview.md to remove Streamlit SDK references --- docs/hub/spaces-overview.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/hub/spaces-overview.md b/docs/hub/spaces-overview.md index 38c169ba7..3d61bf18a 100644 --- a/docs/hub/spaces-overview.md +++ b/docs/hub/spaces-overview.md @@ -8,7 +8,7 @@ In the following sections, you'll learn the basics of creating a Space, configur ## Creating a new Space -**To make a new Space**, visit the [Spaces main page](https://huggingface.co/spaces) and click on **Create new Space**. Along with choosing a name for your Space, selecting an optional license, and setting your Space's visibility, you'll be prompted to choose the **SDK** for your Space. The Hub offers four SDK options: Gradio, Streamlit, Docker and static HTML. If you select "Gradio" as your SDK, you'll be navigated to a new repo showing the following page: +**To make a new Space**, visit the [Spaces main page](https://huggingface.co/spaces) and click on **Create new Space**. Along with choosing a name for your Space, selecting an optional license, and setting your Space's visibility, you'll be prompted to choose the **SDK** for your Space. The Hub offers four SDK options: Gradio, Docker and static HTML. If you select "Gradio" as your SDK, you'll be navigated to a new repo showing the following page:
@@ -19,7 +19,6 @@ Under the hood, Spaces stores your code inside a git repository, just like the m For step-by-step tutorials to creating your first Space, see the guides below: * [Creating a Gradio Space](./spaces-sdks-gradio) -* [Creating a Streamlit Space](./spaces-sdks-streamlit) * [Creating a Docker Space](./spaces-sdks-docker-first-demo) ## Hardware resources @@ -76,7 +75,6 @@ Accessing secrets and variables is different depending on your Space SDK: - For Static Spaces, both are available through client-side JavaScript in `window.huggingface.variables` - For Docker Spaces, check out [environment management with Docker](./spaces-sdks-docker#secrets-and-variables-management) -- For Streamlit Spaces, secrets are exposed to your app through [Streamlit Secrets Management](https://blog.streamlit.io/secrets-in-sharing-apps/), and public variables are directly available as environment variables For other Spaces, both are exposed to your app as environment variables. Here is a very simple example of accessing the previously declared `MODEL_REPO_ID` variable in Python (it would be the same for secrets): ```py From 90e1d024354c4d6801082b1fc859a76e90c5e52d Mon Sep 17 00:00:00 2001 From: hysts Date: Thu, 10 Jul 2025 13:15:48 +0000 Subject: [PATCH 03/13] Remove Streamlit SDK reference from API documentation for space type --- docs/hub/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hub/api.md b/docs/hub/api.md index 20c1de0b3..a0bfd342c 100644 --- a/docs/hub/api.md +++ b/docs/hub/api.md @@ -176,7 +176,7 @@ Parameters: - `name`: Name of repo. - `organization`: Name of organization (optional). - `private`: Whether the repo is private. -- `sdk`: When the type is `space` (streamlit, gradio, docker or static) +- `sdk`: When the type is `space` (gradio, docker or static) Payload: From 4c06bdd2aebf578afe6eb1915563259b56b18ce1 Mon Sep 17 00:00:00 2001 From: hysts Date: Thu, 10 Jul 2025 13:24:36 +0000 Subject: [PATCH 04/13] Clarify Gradio SDK version specification in spaces-dependencies.md --- docs/hub/spaces-dependencies.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/hub/spaces-dependencies.md b/docs/hub/spaces-dependencies.md index 8a7debfb6..fb7b91599 100644 --- a/docs/hub/spaces-dependencies.md +++ b/docs/hub/spaces-dependencies.md @@ -12,7 +12,8 @@ The default Spaces environment comes with several pre-installed dependencies: * [`datasets`](https://github.com/huggingface/datasets) allows you to fetch or display any dataset from the Hub inside your app. -* The SDK you specified, which could be either `streamlit` or `gradio`. The version is specified in the `README.md` file. +* Gradio version is specified by the `sdk_version` in the `README.md` file. + * Common Debian packages, such as `ffmpeg`, `cmake`, `libsm6`, and few others. From 6b4b2177c478f63d534e6eacc6fa1677a05ffa91 Mon Sep 17 00:00:00 2001 From: hysts Date: Fri, 11 Jul 2025 01:40:16 +0000 Subject: [PATCH 05/13] Deprecate Streamlit SDK in spaces changelog --- docs/hub/spaces-changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/hub/spaces-changelog.md b/docs/hub/spaces-changelog.md index 647fcb47d..643a84244 100644 --- a/docs/hub/spaces-changelog.md +++ b/docs/hub/spaces-changelog.md @@ -1,5 +1,9 @@ # Spaces Changelog +## [2025-04-30] - Deprecate Streamlit SDK + +- Streamlit is no longer provided as a standard SDK option. Streamlit applications are now created using the Docker template. + ## [2023-07-28] - Upstream Streamlit frontend for `>=1.23.0` - Streamlit SDK uses the upstream packages published on PyPI for `>=1.23.0`, so the newly released versions are available from the day of release. From 684099c7ba8a3cc607126318d79a22b8c0f557a2 Mon Sep 17 00:00:00 2001 From: hysts Date: Fri, 11 Jul 2025 17:09:02 +0900 Subject: [PATCH 06/13] Update docs/hub/spaces-overview.md Co-authored-by: Pedro Cuenca --- docs/hub/spaces-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hub/spaces-overview.md b/docs/hub/spaces-overview.md index 3d61bf18a..6306c2fdd 100644 --- a/docs/hub/spaces-overview.md +++ b/docs/hub/spaces-overview.md @@ -8,7 +8,7 @@ In the following sections, you'll learn the basics of creating a Space, configur ## Creating a new Space -**To make a new Space**, visit the [Spaces main page](https://huggingface.co/spaces) and click on **Create new Space**. Along with choosing a name for your Space, selecting an optional license, and setting your Space's visibility, you'll be prompted to choose the **SDK** for your Space. The Hub offers four SDK options: Gradio, Docker and static HTML. If you select "Gradio" as your SDK, you'll be navigated to a new repo showing the following page: +**To make a new Space**, visit the [Spaces main page](https://huggingface.co/spaces) and click on **Create new Space**. Along with choosing a name for your Space, selecting an optional license, and setting your Space's visibility, you'll be prompted to choose the **SDK** for your Space. The Hub offers three SDK options: Gradio, Docker and static HTML. If you select "Gradio" as your SDK, you'll be navigated to a new repo showing the following page:
From 2af01a91057c654d8c4977b979d65117a45138c8 Mon Sep 17 00:00:00 2001 From: hysts Date: Fri, 11 Jul 2025 17:31:37 +0900 Subject: [PATCH 07/13] Update docs/hub/spaces-dependencies.md Co-authored-by: Pedro Cuenca --- docs/hub/spaces-dependencies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hub/spaces-dependencies.md b/docs/hub/spaces-dependencies.md index fb7b91599..2f959743a 100644 --- a/docs/hub/spaces-dependencies.md +++ b/docs/hub/spaces-dependencies.md @@ -12,7 +12,7 @@ The default Spaces environment comes with several pre-installed dependencies: * [`datasets`](https://github.com/huggingface/datasets) allows you to fetch or display any dataset from the Hub inside your app. -* Gradio version is specified by the `sdk_version` in the `README.md` file. +* [`gradio`](https://github.com/gradio-app/gradio). You can optionally require a specific version using [`sdk_version` in the `README.md` file](spaces-config-reference). * Common Debian packages, such as `ffmpeg`, `cmake`, `libsm6`, and few others. From 9f50b73f91a06c75481e5c55cf2d1c13bcf5f518 Mon Sep 17 00:00:00 2001 From: hysts Date: Fri, 11 Jul 2025 08:35:33 +0000 Subject: [PATCH 08/13] Update spaces-dependencies.md to specify Gradio Spaces environment and clarify pre-installed dependencies --- docs/hub/spaces-dependencies.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/hub/spaces-dependencies.md b/docs/hub/spaces-dependencies.md index 2f959743a..ad4ad3d9a 100644 --- a/docs/hub/spaces-dependencies.md +++ b/docs/hub/spaces-dependencies.md @@ -1,8 +1,8 @@ -# Handling Spaces Dependencies +# Handling Spaces Dependencies in Gradio Spaces ## Default dependencies -The default Spaces environment comes with several pre-installed dependencies: +The default Gradio Spaces environment comes with several pre-installed dependencies: * The [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/index) client library allows you to manage your repository and files on the Hub with Python and programmatically access the Inference API from your Space. If you choose to instantiate the model in your app with the Inference API, you can benefit from the built-in acceleration optimizations. This option also consumes less computing resources, which is always nice for the environment! 🌎 From 14d0326e61583627c3ad010062e49f155e21dc10 Mon Sep 17 00:00:00 2001 From: Julien Chaumond Date: Fri, 11 Jul 2025 19:47:25 +0200 Subject: [PATCH 09/13] more changes --- docs/hub/index.md | 1 - docs/hub/spaces-dev-mode.md | 2 +- docs/hub/spaces-using-opencv.md | 2 +- docs/hub/spaces.md | 3 +-- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/hub/index.md b/docs/hub/index.md index a6a1b7a99..9601b296f 100644 --- a/docs/hub/index.md +++ b/docs/hub/index.md @@ -56,7 +56,6 @@ The Hugging Face Hub is a platform with over 1.7M models, 400k datasets, and 600 Introduction Spaces Overview Gradio Spaces -Streamlit Spaces Static HTML Spaces Docker Spaces Embed your Space diff --git a/docs/hub/spaces-dev-mode.md b/docs/hub/spaces-dev-mode.md index 467c3579a..29638649d 100644 --- a/docs/hub/spaces-dev-mode.md +++ b/docs/hub/spaces-dev-mode.md @@ -37,7 +37,7 @@ Once the Dev Mode is enabled on your Space, you should see a modal like the foll The application does not restart automatically when you change the code. For your changes to appear in the Space, you need to use the `Refresh` button that will restart the app.
- If you're using the Streamlit or Gradio SDK, or if your application is Python-based, note that requirements are not installed automatically. + If you're using the Gradio SDK, or if your application is Python-based, note that requirements are not installed automatically. You will need to manually run `pip install` from VS Code or SSH.
diff --git a/docs/hub/spaces-using-opencv.md b/docs/hub/spaces-using-opencv.md index 96afe2db5..708e3ef9b 100644 --- a/docs/hub/spaces-using-opencv.md +++ b/docs/hub/spaces-using-opencv.md @@ -1,6 +1,6 @@ # Using OpenCV in Spaces -In order to use OpenCV in your Gradio or Streamlit Spaces, you'll need to make the Space install both the Python and Debian dependencies +In order to use OpenCV in your Gradio or Python Spaces, you'll need to make the Space install both the Python and Debian dependencies This means adding `python3-opencv` to the `packages.txt` file, and adding `opencv-python` to the `requirements.txt` file. If those files don't exist, you'll need to create them. diff --git a/docs/hub/spaces.md b/docs/hub/spaces.md index cd429d569..9909b8889 100644 --- a/docs/hub/spaces.md +++ b/docs/hub/spaces.md @@ -2,7 +2,7 @@ [Hugging Face Spaces](https://huggingface.co/spaces) offer a simple way to host ML demo apps directly on your profile or your organization's profile. This allows you to create your ML portfolio, showcase your projects at conferences or to stakeholders, and work collaboratively with other people in the ML ecosystem. -We have built-in support for two awesome SDKs that let you build cool apps in Python in a matter of minutes: **[Streamlit](https://streamlit.io/)** and **[Gradio](https://gradio.app/)**, but you can also unlock the whole power of Docker and host an arbitrary Dockerfile. Finally, you can create static Spaces using JavaScript and HTML. +We have built-in support for an awesome SDK that let you build cool apps in Python in a matter of minutes: **[Gradio](https://gradio.app/)**, but you can also unlock the whole power of Docker and host an arbitrary Dockerfile. Finally, you can create static Spaces using JavaScript and HTML. You'll also be able to upgrade your Space to run [on a GPU or other accelerated hardware](./spaces-gpus). ⚡️ @@ -20,7 +20,6 @@ You'll also be able to upgrade your Space to run [on a GPU or other accelerated - [Spaces GPU Upgrades](./spaces-gpus) - [Spaces Persistent Storage](./spaces-storage) - [Gradio Spaces](./spaces-sdks-gradio) -- [Streamlit Spaces](./spaces-sdks-streamlit) - [Docker Spaces](./spaces-sdks-docker) - [Static HTML Spaces](./spaces-sdks-static) - [Custom Python Spaces](./spaces-sdks-python) From 4f3769db2a46aad2dd4b7cdd5af75c09c645585e Mon Sep 17 00:00:00 2001 From: hysts Date: Sat, 12 Jul 2025 10:27:37 +0900 Subject: [PATCH 10/13] Update docs/hub/spaces-changelog.md Co-authored-by: Julien Chaumond --- docs/hub/spaces-changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hub/spaces-changelog.md b/docs/hub/spaces-changelog.md index 643a84244..4e63b26d5 100644 --- a/docs/hub/spaces-changelog.md +++ b/docs/hub/spaces-changelog.md @@ -2,7 +2,7 @@ ## [2025-04-30] - Deprecate Streamlit SDK -- Streamlit is no longer provided as a standard SDK option. Streamlit applications are now created using the Docker template. +- Streamlit is no longer provided as a default built-in SDK option. Streamlit applications are now created using the Docker template. ## [2023-07-28] - Upstream Streamlit frontend for `>=1.23.0` From 9a6959e508a2dd097e5bdd565524cc812fe81396 Mon Sep 17 00:00:00 2001 From: hysts Date: Sat, 12 Jul 2025 01:41:01 +0000 Subject: [PATCH 11/13] Deprecate Streamlit as default SDK for Spaces and recommend Docker SDK --- docs/hub/spaces-sdks-streamlit.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/hub/spaces-sdks-streamlit.md b/docs/hub/spaces-sdks-streamlit.md index 89ead9deb..098bb7a76 100644 --- a/docs/hub/spaces-sdks-streamlit.md +++ b/docs/hub/spaces-sdks-streamlit.md @@ -1,3 +1,10 @@ + + +The option to use Streamlit as the default built-in SDK for Spaces is deprecated. +If you wish to deploy a Space with Streamlit, please use the Docker SDK instead. + + + # Streamlit Spaces **Streamlit** gives users freedom to build a full-featured web app with Python in a *reactive* way. Your code is rerun each time the state of the app changes. Streamlit is also great for data visualization and supports several charting libraries such as Bokeh, Plotly, and Altair. Read this [blog post](https://huggingface.co/blog/streamlit-spaces) about building and hosting Streamlit apps in Spaces. From 9c02f9fbedcea135178d0631770091b9b0311f5c Mon Sep 17 00:00:00 2001 From: hysts Date: Sun, 13 Jul 2025 09:42:36 +0900 Subject: [PATCH 12/13] Update docs/hub/spaces-sdks-streamlit.md Co-authored-by: Julien Chaumond --- docs/hub/spaces-sdks-streamlit.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hub/spaces-sdks-streamlit.md b/docs/hub/spaces-sdks-streamlit.md index 098bb7a76..a2344f116 100644 --- a/docs/hub/spaces-sdks-streamlit.md +++ b/docs/hub/spaces-sdks-streamlit.md @@ -1,7 +1,7 @@ The option to use Streamlit as the default built-in SDK for Spaces is deprecated. -If you wish to deploy a Space with Streamlit, please use the Docker SDK instead. +If you wish to deploy a Space with Streamlit, please pick the Docker SDK, then use the Streamlit template. From 61c5d5a4fbb6fbd21582715f575b71488f0ed2aa Mon Sep 17 00:00:00 2001 From: hysts Date: Sun, 13 Jul 2025 01:16:31 +0000 Subject: [PATCH 13/13] Add image for Streamlit Docker SDK --- docs/hub/spaces-sdks-streamlit.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/hub/spaces-sdks-streamlit.md b/docs/hub/spaces-sdks-streamlit.md index a2344f116..1d447c69c 100644 --- a/docs/hub/spaces-sdks-streamlit.md +++ b/docs/hub/spaces-sdks-streamlit.md @@ -3,6 +3,10 @@ The option to use Streamlit as the default built-in SDK for Spaces is deprecated. If you wish to deploy a Space with Streamlit, please pick the Docker SDK, then use the Streamlit template. +
+ +
+ # Streamlit Spaces