Skip to content

Commit d40f0b9

Browse files
hystspcuencajulien-c
authored
Remove streamlit from Space SDKs (#1834)
* Update spaces-config-reference.md to remove streamlit SDK * Update spaces-overview.md to remove Streamlit SDK references * Remove Streamlit SDK reference from API documentation for space type * Clarify Gradio SDK version specification in spaces-dependencies.md * Deprecate Streamlit SDK in spaces changelog * Update docs/hub/spaces-overview.md Co-authored-by: Pedro Cuenca <pedro@huggingface.co> * Update docs/hub/spaces-dependencies.md Co-authored-by: Pedro Cuenca <pedro@huggingface.co> * Update spaces-dependencies.md to specify Gradio Spaces environment and clarify pre-installed dependencies * more changes * Update docs/hub/spaces-changelog.md Co-authored-by: Julien Chaumond <julien@huggingface.co> * Deprecate Streamlit as default SDK for Spaces and recommend Docker SDK * Update docs/hub/spaces-sdks-streamlit.md Co-authored-by: Julien Chaumond <julien@huggingface.co> * Add image for Streamlit Docker SDK --------- Co-authored-by: Pedro Cuenca <pedro@huggingface.co> Co-authored-by: Julien Chaumond <julien@huggingface.co>
1 parent 2efed4e commit d40f0b9

10 files changed

+27
-16
lines changed

docs/hub/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Parameters:
176176
- `name`: Name of repo.
177177
- `organization`: Name of organization (optional).
178178
- `private`: Whether the repo is private.
179-
- `sdk`: When the type is `space` (streamlit, gradio, docker or static)
179+
- `sdk`: When the type is `space` (gradio, docker or static)
180180

181181
Payload:
182182

docs/hub/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ The Hugging Face Hub is a platform with over 1.7M models, 400k datasets, and 600
5656
<a class="no-underline! hover:opacity-60 transform transition-colors hover:translate-x-px" href="./spaces">Introduction</a>
5757
<a class="no-underline! hover:opacity-60 transform transition-colors hover:translate-x-px" href="./spaces-overview">Spaces Overview</a>
5858
<a class="no-underline! hover:opacity-60 transform transition-colors hover:translate-x-px" href="./spaces-sdks-gradio">Gradio Spaces</a>
59-
<a class="no-underline! hover:opacity-60 transform transition-colors hover:translate-x-px" href="./spaces-sdks-streamlit">Streamlit Spaces</a>
6059
<a class="no-underline! hover:opacity-60 transform transition-colors hover:translate-x-px" href="./spaces-sdks-static">Static HTML Spaces</a>
6160
<a class="no-underline! hover:opacity-60 transform transition-colors hover:translate-x-px" href="./spaces-sdks-docker">Docker Spaces</a>
6261
<a class="no-underline! hover:opacity-60 transform transition-colors hover:translate-x-px" href="./spaces-embed">Embed your Space</a>

docs/hub/spaces-changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Spaces Changelog
22

3+
## [2025-04-30] - Deprecate Streamlit SDK
4+
5+
- Streamlit is no longer provided as a default built-in SDK option. Streamlit applications are now created using the Docker template.
6+
37
## [2023-07-28] - Upstream Streamlit frontend for `>=1.23.0`
48

59
- 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.

docs/hub/spaces-config-reference.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@ Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gr
1717
Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray).
1818

1919
**`sdk`** : _string_
20-
Can be either `gradio`, `streamlit`, `docker`, or `static`.
20+
Can be either `gradio`, `docker`, or `static`.
2121

2222
**`python_version`**: _string_
2323
Any valid Python `3.x` or `3.x.x` version.
2424
Defaults to `3.10`.
2525

2626
**`sdk_version`** : _string_
27-
Specify the version of the selected SDK (Streamlit or Gradio).
27+
Specify the version of Gradio to use.
2828
All versions of Gradio are supported.
29-
All versions of Streamlit from `0.79.0` are supported.
3029

3130
**`suggested_hardware`** : _string_
3231
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
4645
Value must be one of `"small"`, `"medium"` or `"large"`.
4746

4847
**`app_file`** : _string_
49-
Path to your main application file (which contains either `gradio` or `streamlit` Python code, or `static` html code).
48+
Path to your main application file (which contains either `gradio` Python code or `static` html code).
5049
Path is relative to the root of the repository.
5150

5251
**`app_build_command`** : _string_

docs/hub/spaces-dependencies.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Handling Spaces Dependencies
1+
# Handling Spaces Dependencies in Gradio Spaces
22

33
## Default dependencies
44

5-
The default Spaces environment comes with several pre-installed dependencies:
5+
The default Gradio Spaces environment comes with several pre-installed dependencies:
66

77
* 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! 🌎
88

@@ -12,7 +12,8 @@ The default Spaces environment comes with several pre-installed dependencies:
1212

1313
* [`datasets`](https://github.com/huggingface/datasets) allows you to fetch or display any dataset from the Hub inside your app.
1414

15-
* The SDK you specified, which could be either `streamlit` or `gradio`. The version is specified in the `README.md` file.
15+
* [`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).
16+
1617

1718
* Common Debian packages, such as `ffmpeg`, `cmake`, `libsm6`, and few others.
1819

docs/hub/spaces-dev-mode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Once the Dev Mode is enabled on your Space, you should see a modal like the foll
3737
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.
3838

3939
<div class="alert alert-warning">
40-
If you're using the Streamlit or Gradio SDK, or if your application is Python-based, note that requirements are not installed automatically.
40+
If you're using the Gradio SDK, or if your application is Python-based, note that requirements are not installed automatically.
4141
You will need to manually run `pip install` from VS Code or SSH.
4242
</div>
4343

docs/hub/spaces-overview.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ In the following sections, you'll learn the basics of creating a Space, configur
88

99
## Creating a new Space
1010

11-
**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:
11+
**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:
1212

1313
<div class="flex justify-center">
1414
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-blank-space.png"/>
@@ -19,7 +19,6 @@ Under the hood, Spaces stores your code inside a git repository, just like the m
1919

2020
For step-by-step tutorials to creating your first Space, see the guides below:
2121
* [Creating a Gradio Space](./spaces-sdks-gradio)
22-
* [Creating a Streamlit Space](./spaces-sdks-streamlit)
2322
* [Creating a Docker Space](./spaces-sdks-docker-first-demo)
2423

2524
## Hardware resources
@@ -76,7 +75,6 @@ Accessing secrets and variables is different depending on your Space SDK:
7675

7776
- For Static Spaces, both are available through client-side JavaScript in `window.huggingface.variables`
7877
- For Docker Spaces, check out [environment management with Docker](./spaces-sdks-docker#secrets-and-variables-management)
79-
- 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
8078

8179
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):
8280
```py

docs/hub/spaces-sdks-streamlit.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
<Tip warning={true}>
2+
3+
The option to use Streamlit as the default built-in SDK for Spaces is deprecated.
4+
If you wish to deploy a Space with Streamlit, please pick the Docker SDK, then use the Streamlit template.
5+
6+
<div class="flex justify-center">
7+
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-streamlit-docker-sdk.png"/>
8+
</div>
9+
10+
</Tip>
11+
112
# Streamlit Spaces
213

314
**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.

docs/hub/spaces-using-opencv.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Using OpenCV in Spaces
22

3-
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
3+
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
44

55
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.
66

docs/hub/spaces.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[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.
44

5-
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.
5+
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.
66

77
You'll also be able to upgrade your Space to run [on a GPU or other accelerated hardware](./spaces-gpus). ⚡️
88

@@ -20,7 +20,6 @@ You'll also be able to upgrade your Space to run [on a GPU or other accelerated
2020
- [Spaces GPU Upgrades](./spaces-gpus)
2121
- [Spaces Persistent Storage](./spaces-storage)
2222
- [Gradio Spaces](./spaces-sdks-gradio)
23-
- [Streamlit Spaces](./spaces-sdks-streamlit)
2423
- [Docker Spaces](./spaces-sdks-docker)
2524
- [Static HTML Spaces](./spaces-sdks-static)
2625
- [Custom Python Spaces](./spaces-sdks-python)

0 commit comments

Comments
 (0)