Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/hub/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 4 additions & 0 deletions docs/hub/spaces-changelog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
7 changes: 3 additions & 4 deletions docs/hub/spaces-config-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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_
Expand Down
7 changes: 4 additions & 3 deletions docs/hub/spaces-dependencies.md
Original file line number Diff line number Diff line change
@@ -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! 🌎

Expand All @@ -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`](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.

Expand Down
4 changes: 1 addition & 3 deletions docs/hub/spaces-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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:

<div class="flex justify-center">
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-blank-space.png"/>
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down