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
* Update spaces docs
* Apply suggestions from code review
Co-authored-by: Steven Liu <[email protected]>
* Final minor changes
Co-authored-by: Steven Liu <[email protected]>
⚠️ This feature is currently in private beta, <a style="font-weight: bold !important" href="/spaces">sign up to the waiting list</a> or <a href="#how-can-i-contact-you">reach out to us</a> if you'd like to try it out ⚠️
9
-
</div>
10
-
11
7
## What are Spaces?
12
8
13
-
Spaces are a simple way to host ML demo apps directly on your profile or your organization’s profile.
9
+
Spaces are 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.
14
10
15
11
We support 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/)**.
16
12
17
-
**To get started**, simply click on [New Space](https://huggingface.co/new-space) in the top navigation menu, create a new repo of type `Space`, and pick your SDK:
Under the hood, we store your code inside a git repository just as done for model and dataset repositories. Thanks to this, the same tools you're already used to (`git` and `git-lfs`) will also work for Spaces.
Each time you commit, we deploy a containerized version of your code on our Infra. More details below!
15
+
**To get started**, simply click on [New Space](https://huggingface.co/new-space) in the top navigation menu, create a new repo of type `Space`, and pick your SDK.
24
16
25
-
<!-- TODO(have someone record a Youtube demo of Spaces showcasing some cool apps already running, etc) -->
17
+
Under the hood, Spaces stores your code inside a git repository, just like the model and dataset repositories. Thanks to this, the same tools you're already used to (`git` and `git-lfs`) also work for Spaces.
26
18
27
19
## Should I use Streamlit or Gradio?
28
20
29
-
We recommend you try both as they're both really awesome! 😎
21
+
We recommend you try both because they're really awesome! 😎
30
22
31
23
Streamlit's documentation is at https://docs.streamlit.io/ and Gradio's doc is at https://gradio.app/getting_started.
32
24
@@ -78,26 +70,35 @@ We deploy a containerized version of your code on our Infra, each time you commi
78
70
79
71
If your app needs any secret keys or tokens to run, you do not want to hardcode them inside your code! Instead, head over to the settings page of your Space repo, and you'll be able to input key/secret pairs.
80
72
81
-
Those secrets will be exposed to your app using the [Streamlit Secrets](https://blog.streamlit.io/secrets-in-sharing-apps/) feature if it's a Streamlit app, or as env variables in other cases.
73
+
Secrets will be exposed to your app using the [Streamlit Secrets](https://blog.streamlit.io/secrets-in-sharing-apps/) feature if it's a Streamlit app, or as environment variables in other cases.
82
74
83
-
## Streamlit advanced features
84
75
85
-
We support those Streamlit features transparently:
76
+
## I am having issues with Streamlit versions!
86
77
87
-
-`st.experimental_get_query_params()` and `st.experimental_set_query_params(**parameter)` to manage app state in the url
88
-
- if something doesn't work, please [reach out](#how-can-i-contact-you).
78
+
The Streamlit version is not configured in the `requirements.txt` file, but rather in the README metadata config through the `sdk_version` setting. Not all Streamlit versions are supported. Refer to the [reference section](#reference) for more information about which versions are supported.
89
79
90
-
## I am having issues with Streamlit versions!
80
+
## Can I use my own HTML instead of Streamlit or Gradio?
91
81
92
-
The Streamlit version is not configured in the `requirements.txt` file, but in the README metadata config through the `sdk_version` setting. Note that we do not support all Streamlit versions, please refer to the [reference section](#reference) for more info on this.
82
+
Although we strongly encourage you to use Streamlit and Gradio, you can also use your own HTML
83
+
code by defining `sdk: static` and having the HTML within an `index.html` file. Here are some examples:
93
84
94
-
## How can I contact you?
85
+
*[Smarter NPC](https://huggingface.co/spaces/mishig/smarter_npc): Display a PlayCanvas project with an iframe.
86
+
*[Huggingfab](https://huggingface.co/spaces/pierreant-p/huggingfab): Display a Sketchfab model in Spaces.
95
87
96
-
Feel free to ask question in the [Forum](https://discuss.huggingface.co/) if it's suitable for the community.
88
+
Please [get in touch](#how-can-i-contact-you) if you have an idea for cool static Spaces.
97
89
98
-
If you're interested in infra challenges, custom demos, GPU or something else, please reach out to us by sending an email to website at huggingface.co.
99
90
100
-
You can also tag us [on Twitter](https://twitter.com/huggingface)!
91
+
## Building an organization card
92
+
93
+
Create an organization card to help users learn more about what your organization is working on and how users can use your libraries, models, datasets, and Spaces. Build an organization card by creating a static README Space with HTML. As an example, take a look at the [Amazon](https://huggingface.co/spaces/amazon/README/blob/main/README.md) and [spaCy](https://huggingface.co/spaces/spacy/README/blob/main/README.md) organization cards.
Streamlit has built-in support for Bokeh with the `st.bokeh_chart` component.
101
102
102
103
## How should I link my Spaces demo in my GitHub repo?
103
104
@@ -157,7 +158,7 @@ Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gr
157
158
Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
158
159
159
160
**`sdk`** : _string_
160
-
Can be either `gradio`or `streamlit`
161
+
Can be either `gradio`, `streamlit`or `static`
161
162
162
163
**`sdk_version`** : _string_
163
164
Only applicable for `streamlit` SDK. Currently available versions are :
@@ -170,10 +171,9 @@ Path is relative to the root of the repository.
170
171
**`pinned`** : _boolean_
171
172
Whether the Space stays on top of your list.
172
173
173
-
174
174
## How can I manage my app through Github
175
175
176
-
You can keep your app in sync with your GitHub repository by leveraging GitHub Actions:
176
+
Keep your app in sync with your GitHub repository with GitHub Actions:
177
177
178
178
- We require Git LFS for files above 10MB so you may need to review your files if you don't want to use Git LFS. This includes your history. You can use handy tools such as [BFG Repo-Cleaner](https://rtyley.github.io/bfg-repo-cleaner/) to remove the large files from your history (keep a local copy of your repository for backup).
179
179
- Set your GitHub repository and your Spaces app initially in sync: to add your Spaces app as an additional remote to your existing git repository, you can use the command `git remote add space https://huggingface.co/spaces/FULL_SPACE_NAME`. You can then force-push to sync everything for the first time: `git push --force space main`
@@ -225,6 +225,14 @@ jobs:
225
225
226
226
```
227
227
228
+
## How can I contact you?
229
+
230
+
Feel free to ask questions on the [forum](https://discuss.huggingface.co/) if it's suitable for the community.
231
+
232
+
If you're interested in infra challenges, custom demos, GPUs, or something else, please reach out to us by sending an email to **website at huggingface.co**.
233
+
234
+
You can also tag us [on Twitter](https://twitter.com/huggingface)!
0 commit comments