You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/hub/spaces-dependencies.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
# Handling Spaces Dependencies
1
+
# Handling Spaces Dependencies in Gradio Spaces
2
2
3
3
## Default dependencies
4
4
5
-
The default Spaces environment comes with several pre-installed dependencies:
5
+
The default Gradio Spaces environment comes with several pre-installed dependencies:
6
6
7
7
* 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! 🌎
8
8
@@ -12,7 +12,8 @@ The default Spaces environment comes with several pre-installed dependencies:
12
12
13
13
*[`datasets`](https://github.com/huggingface/datasets) allows you to fetch or display any dataset from the Hub inside your app.
14
14
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
+
16
17
17
18
* Common Debian packages, such as `ffmpeg`, `cmake`, `libsm6`, and few others.
Copy file name to clipboardExpand all lines: docs/hub/spaces-dev-mode.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ Once the Dev Mode is enabled on your Space, you should see a modal like the foll
37
37
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.
38
38
39
39
<divclass="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.
41
41
You will need to manually run `pip install` from VS Code or SSH.
Copy file name to clipboardExpand all lines: docs/hub/spaces-overview.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ In the following sections, you'll learn the basics of creating a Space, configur
8
8
9
9
## Creating a new Space
10
10
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:
@@ -19,7 +19,6 @@ Under the hood, Spaces stores your code inside a git repository, just like the m
19
19
20
20
For step-by-step tutorials to creating your first Space, see the guides below:
21
21
*[Creating a Gradio Space](./spaces-sdks-gradio)
22
-
*[Creating a Streamlit Space](./spaces-sdks-streamlit)
23
22
*[Creating a Docker Space](./spaces-sdks-docker-first-demo)
24
23
25
24
## Hardware resources
@@ -76,7 +75,6 @@ Accessing secrets and variables is different depending on your Space SDK:
76
75
77
76
- For Static Spaces, both are available through client-side JavaScript in `window.huggingface.variables`
78
77
- 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
80
78
81
79
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):
**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.
Copy file name to clipboardExpand all lines: docs/hub/spaces-using-opencv.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Using OpenCV in Spaces
2
2
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
4
4
5
5
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.
Copy file name to clipboardExpand all lines: docs/hub/spaces.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
[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.
4
4
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.
6
6
7
7
You'll also be able to upgrade your Space to run [on a GPU or other accelerated hardware](./spaces-gpus). ⚡️
8
8
@@ -20,7 +20,6 @@ You'll also be able to upgrade your Space to run [on a GPU or other accelerated
0 commit comments