Skip to content

Commit

Permalink
Merge branch 'main' into hacktoberfest-languages-pt2
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-it authored Oct 4, 2023
2 parents 02e4467 + 70ef63e commit bac8798
Show file tree
Hide file tree
Showing 8 changed files with 720 additions and 16 deletions.
2 changes: 2 additions & 0 deletions docs/hub/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@
title: Panel on Spaces
- local: spaces-sdks-docker-chatui
title: ChatUI on Spaces
- local: spaces-sdks-docker-tabby
title: Tabby on Spaces
- local: spaces-embed
title: Embed your Space
- local: spaces-run-with-docker
Expand Down
24 changes: 12 additions & 12 deletions docs/hub/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ params = {

This is equivalent to `huggingface_hub.list_models()`.

### GET /api/models/(repo_id) or /api/models/(repo_id)/revision/(revision)
### GET /api/models/{repo_id} or /api/models/{repo_id}/revision/{revision}

Get all information for a specific model.

Expand Down Expand Up @@ -77,7 +77,7 @@ params = {

This is equivalent to `huggingface_hub.list_datasets()`.

### GET /api/datasets/(repo_id) or /api/datasets/(repo_id)/revision/(revision)
### GET /api/datasets/{repo_id} or /api/datasets/{repo_id}/revision/{revision}

Get all information for a specific dataset.

Expand All @@ -91,11 +91,11 @@ params = {"full": "full"}

This is equivalent to `huggingface_hub.dataset_info(repo_id, revision)`.

### GET /api/datasets/(repo_id)/parquet
### GET /api/datasets/{repo_id}/parquet

Get the list of auto-converted parquet files.

### GET /api/datasets/(repo_id)/parquet/(config)/(split)/(n).parquet
### GET /api/datasets/{repo_id}/parquet/{config}/{split}/{n}.parquet

Get the nth shard of the auto-converted parquet files.

Expand Down Expand Up @@ -134,7 +134,7 @@ params = {

This is equivalent to `huggingface_hub.list_spaces()`.

### GET /api/spaces/(repo_id) or /api/spaces/(repo_id)/revision/(revision)
### GET /api/spaces/{repo_id} or /api/spaces/{repo_id}/revision/{revision}
Get all information for a specific model.

This is equivalent to `huggingface_hub.space_info(repo_id, revision)`.
Expand Down Expand Up @@ -192,7 +192,7 @@ payload = {

This is equivalent to `huggingface_hub.delete_repo()`.

### PUT /api/repos/(repo_type)/(repo_id)/settings
### PUT /api/repos/{repo_type}/{repo_id}/settings

Update repo visibility.

Expand Down Expand Up @@ -265,13 +265,13 @@ payload = {

This is equivalent to `huggingface_hub.create_collection()`.

### GET /api/collections/(namespace)/(slug)-(id)
### GET /api/collections/{namespace}/{slug}-{id}

Return information about a collection.

This is equivalent to `huggingface_hub.get_collection()`.

### PATCH /api/collections/(namespace)/(slug)-(id)
### PATCH /api/collections/{namespace}/{slug}-{id}

Update the metadata of a collection on the Hub. You can't add or modify the items of the collection with this method. All fields of the payload are optional.

Expand All @@ -289,13 +289,13 @@ payload = {

This is equivalent to `huggingface_hub.update_collection_metadata()`.

### DELETE /api/collections/(namespace)/(slug)-(id)
### DELETE /api/collections/{namespace}/{slug}-{id}

Return a collection. This is a non-revertible operation. A deleted collection cannot be restored.

This is equivalent to `huggingface_hub.delete_collection()`.

### POST /api/collections/(namespace)/(slug)-(id)/item)
### POST /api/collections/{namespace}/{slug}-{id}/item

Add an item to a collection. An item is defined by a type (`model`, `dataset`, `space` or `paper`) and an id (repo_id or paper_id on the Hub). A note can also be attached to the item (optional).

Expand All @@ -313,7 +313,7 @@ payload = {

This is equivalent to `huggingface_hub.add_collection_item()`.

### PATCH /api/collections/(namespace)/(slug)-(id)/items/(item_id)
### PATCH /api/collections/{namespace}/{slug}-{id}/items/{item_id}

Update an item in a collection. You must know the item object id which is different from the repo_id/paper_id provided when adding the item to the collection. The `item_id` can be retrieved by fetching the collection.

Expand All @@ -328,7 +328,7 @@ payload = {

This is equivalent to `huggingface_hub.update_collection_item()`.

### DELETE /api/collections/(namespace)/(slug)-(id)/items/(item_id)
### DELETE /api/collections/{namespace}/{slug}-{id}/items/{item_id}

Remove an item from a collection. You must know the item object id which is different from the repo_id/paper_id provided when adding the item to the collection. The `item_id` can be retrieved by fetching the collection.

Expand Down
2 changes: 1 addition & 1 deletion docs/hub/spaces-sdks-docker-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ We gathered some example demos in the [Docker Templates](https://huggingface.co/
* Shiny app written in Python https://huggingface.co/spaces/elonmuskceo/shiny-orbit-simulation
* Genie.jl app in Julia https://huggingface.co/spaces/nooji/GenieOnHuggingFaceSpaces
* Argilla app for data labelling and curation: https://huggingface.co/spaces/argilla/live-demo and [write-up about hosting Argilla on Spaces](./spaces-sdks-docker-argilla) by [@dvilasuero](https://huggingface.co/dvilasuero) 🎉
* JupyterLab: https://huggingface.co/spaces/camenduru/jupyter
* JupyterLab and VSCode: https://huggingface.co/spaces/DockerTemplates/docker-examples
* Zeno app for interactive model evaluation: https://huggingface.co/spaces/zeno-ml/diffusiondb and [instructions for setup](https://zenoml.com/docs/deployment#hugging-face-spaces)
* Gradio App: https://huggingface.co/spaces/sayakpaul/demo-docker-gradio
67 changes: 67 additions & 0 deletions docs/hub/spaces-sdks-docker-tabby.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Tabby on Spaces

[Tabby](https://tabby.tabbyml.com) is an open-source, self-hosted AI coding assistant. With Tabby, every team can set up its own LLM-powered code completion server with ease.

In this guide, you will learn how to deploy your own Tabby instance and use it for development directly from the Hugging Face website.

## Your first Tabby Space

In this section, you will learn how to deploy a Tabby Space and use it for yourself or your orgnization.

### Deploy Tabby on Spaces

You can deploy Tabby on Spaces with just a few clicks:

[![Deploy on HF Spaces](https://huggingface.co/datasets/huggingface/badges/raw/main/deploy-to-spaces-lg.svg)](https://huggingface.co/spaces/TabbyML/tabby-template-space?duplicate=true)

You need to define the Owner (your personal account or an organization), a Space name, and the Visibility. To secure the api endpoint, we're configuring the visibility as Private.

![Duplicate Space](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/tabby/duplicate-space.png)



You’ll see the *Building status*. Once it becomes *Running*, your Space is ready to go. If you don’t see the Tabby Swagger UI, try refreshing the page.

![Swagger UI](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/tabby/swagger-ui.png)

<Tip>

If you want to customize the title, emojis, and colors of your space, go to "Files and Versions" and edit the metadata of your README.md file.

</Tip>

### Your Tabby Space URL

Once Tabby is up and running, for a space link such as https://huggingface.com/spaces/TabbyML/tabby, the direct URL will be https://tabbyml-tabby.hf.space.
This URL provides access to a stable Tabby instance in full-screen mode and serves as the API endpoint for IDE/Editor Extensions to talk with.

### Connect VSCode Extension to Space backend

1. Install the [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=TabbyML.vscode-tabby).
2. Open the file located at `~/.tabby-client/agent/config.toml`. Uncomment both the `[server]` section and the `[server.requestHeaders]` section.
* Set the endpoint to the Direct URL you found in the previous step, which should look something like `https://UserName-SpaceName.hf.space`.
* As the Space is set to **Private**, it is essential to configure the authorization header for accessing the endpoint. You can obtain a token from the [Access Tokens](https://huggingface.co/settings/tokens) page.

<center>

![Agent Config](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/tabby/agent-config.png)

</center>

3. You'll notice a ✓ icon indicating a successful connection.
![Tabby Connected](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/tabby/tabby-connected.png)

4. You've complete the setup, now enjoy tabing!

<center>

![Code Completion](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/tabby/code-completion.png)

</center>

You can also utilize Tabby extensions in other IDEs, such as [JetBrains](https://plugins.jetbrains.com/plugin/22379-tabby).


## Feedback and support

If you have improvement suggestions or need specific support, please join [Tabby Slack community](https://join.slack.com/t/tabbycommunity/shared_invite/zt-1xeiddizp-bciR2RtFTaJ37RBxr8VxpA) or reach out on [Tabby’s GitHub repository](https://github.com/TabbyML/tabby).
5 changes: 3 additions & 2 deletions hacktoberfest_challenges/datasets_without_language.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Currently, you can add a language tag for `code`. You will need to do this direc

## Datasets without language field filled in


| status | pr_url | hub_id | downloads | likes |
|--------|-----------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|-------|
| | | [sahil2801/CodeAlpaca-20k](https://huggingface.co/datasets/sahil2801/CodeAlpaca-20k) | 2124 | 104 |
Expand All @@ -70,7 +71,7 @@ Currently, you can add a language tag for `code`. You will need to do this direc
| | | [HuggingFaceH4/CodeAlpaca_20K](https://huggingface.co/datasets/HuggingFaceH4/CodeAlpaca_20K) | 850 | 36 |
| | | [codeparrot/self-instruct-starcoder](https://huggingface.co/datasets/codeparrot/self-instruct-starcoder) | 454 | 25 |
| | | [unaidedelf87777/openapi-function-invocations-25k](https://huggingface.co/datasets/unaidedelf87777/openapi-function-invocations-25k) | 47 | 20 |
| | | [Matthijs/cmu-arctic-xvectors](https://huggingface.co/datasets/Matthijs/cmu-arctic-xvectors) | 158508 | 19 |
| | [here](https://huggingface.co/datasets/Matthijs/cmu-arctic-xvectors/discussions/4) | [Matthijs/cmu-arctic-xvectors](https://huggingface.co/datasets/Matthijs/cmu-arctic-xvectors) | 158508 | 19 |
| | | [skg/toxigen-data](https://huggingface.co/datasets/skg/toxigen-data) | 957 | 17 |
| | | [oscar-corpus/colossal-oscar-1.0](https://huggingface.co/datasets/oscar-corpus/colossal-oscar-1.0) | 66 | 17 |
| | | [aadityaubhat/GPT-wiki-intro](https://huggingface.co/datasets/aadityaubhat/GPT-wiki-intro) | 267 | 15 |
Expand Down Expand Up @@ -338,4 +339,4 @@ Currently, you can add a language tag for `code`. You will need to do this direc
| | [here](https://huggingface.co/datasets/Memis/turkishReviews-ds-mini/discussions/1#651aec95a6e00a1678c00c78) | [Memis/turkishReviews-ds-mini](https://huggingface.co/datasets/Memis/turkishReviews-ds-mini) | 0 | 0 |
| | [here](https://huggingface.co/datasets/PulsarAI/turkish_movie_sentiment/discussions/1#651aecb96ef522c487d5ef62) | [PulsarAI/turkish_movie_sentiment](https://huggingface.co/datasets/PulsarAI/turkish_movie_sentiment) | 0 | 0 |
| Merged | [here](https://huggingface.co/datasets/ahmet1338/turkishReviews-ds-mini/discussions/1#651aecc4d76ad9bc085fe5e5) | [ahmet1338/turkishReviews-ds-mini](https://huggingface.co/datasets/ahmet1338/turkishReviews-ds-mini) | 0 | 0 |
| | [here](https://huggingface.co/datasets/nogyxo/question-answering-ukrainian-json-answers/discussions/1) | [nogyxo/question-answering-ukrainian-json-answers](https://huggingface.co/datasets/nogyxo/question-answering-ukrainian-json-answers) | 0 | 0 |
| | [here](https://huggingface.co/datasets/nogyxo/question-answering-ukrainian-json-answers/discussions/1) | [nogyxo/question-answering-ukrainian-json-answers](https://huggingface.co/datasets/nogyxo/question-answering-ukrainian-json-answers) | 0 | 0 |
2 changes: 1 addition & 1 deletion hacktoberfest_challenges/model_license_other.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Related to https://github.com/huggingface/hub-docs/issues/985.

The Hugging Face Hub hosts hundreds of thousands of public models and datasets. Public doesn't necessarily mean open-source without any limitations. Authors can define which license applies to the work they share (e.g. [MIT](https://opensource.org/license/mit/), [Apache2.0](https://www.apache.org/licenses/LICENSE-2.0), [OpenRAIL](https://huggingface.co/blog/open_rail), etc.). All users must be able to quickly know which license applies to which model and even to list models with a specific license (e.g. [Apache2.0](https://huggingface.co/models?license=license:apache-2.0&sort=trending)). The Hub relies on the [Model Card](https://huggingface.co/docs/hub/model-cards) to do so. A Model Card is a file attached to a model providing handy information. They are essential for discoverability, reproducibility and sharing. In our case, we will focus on the [metadata](https://huggingface.co/docs/hub/model-cards#model-card-metadata) section of the Model Card. This metadata contains valuable information, including a `license` tag.

In this challenge, we will focus on models that as the license `"other"`. This means that the model has a custom license defined by the author. For example, models from Coqui have their own [coqui-public-model-license](https://coqui.ai/cpml). Historically, this information was not available in the model card metadata. This is now possible by adding the license name and a URL to it:
In this challenge, we will focus on models that have the license `"other"`. This means that the model has a custom license defined by the author. For example, models from Coqui have their own [coqui-public-model-license](https://coqui.ai/cpml). Historically, this information was not available in the model card metadata. This is now possible by adding the license name and a URL to it:


```yaml
Expand Down
Loading

0 comments on commit bac8798

Please sign in to comment.