Skip to content

Commit

Permalink
More screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
nataliaElv committed Nov 22, 2024
1 parent 944b877 commit 9bb7a59
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions chapters/en/chapter10/2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ The easiest way to set up your Argilla instance is through Hugging Face Spaces:
2. Under "Select the Space SDK" select **Docker**, then **Argilla**.
3. Fill in the rest of the form following the instructions and click **Create Space**.

<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter10/space_config.png" alt="Space configuration form."/>

>[!WARNING]
> ⚠️ You may want to enable **Persistent storage** so the data isn't lost if the Space is paused or restarted.
> You can do that from the Settings of your Space.
Expand Down
10 changes: 9 additions & 1 deletion chapters/en/chapter10/3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,20 @@ dataset = rg.Dataset(name="ag_news", settings=settings)
dataset.create()
```

The dataset now appears in our Argilla instance, but you will see that it's empty. Now we need to add the records that we'll be annotating i.e., the rows in our dataset. To do that, we'll simply need to log the data as records and provide a mapping for those elements that don't have the same name in the hub and Argilla datasets:
The dataset now appears in our Argilla instance, but you will see that it's empty:

<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter10/empty_dataset.png" alt="Screenshot of the empty dataset."/>

Now we need to add the records that we'll be annotating i.e., the rows in our dataset. To do that, we'll simply need to log the data as records and provide a mapping for those elements that don't have the same name in the hub and Argilla datasets:

```python
dataset.records.log(data, mapping={"label_text": "label"})
```

In our mapping, we've specified that the `label_text` column in the dataset should be mapped to the question with the name `label`. In this way, we'll use the existing labels in the dataset as pre-annotations so we can annotate faster.

After this, the dataset should look like this:

<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter10/argilla_initial_dataset.png" alt="Screenshot of the dataset in Argilla."/>

Now our dataset is ready to start annotating!

0 comments on commit 9bb7a59

Please sign in to comment.