Skip to content

Commit

Permalink
Update getting_started guide
Browse files Browse the repository at this point in the history
  • Loading branch information
nik committed Jun 13, 2024
1 parent cf38bac commit de4235d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions fern/pages/getting_started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ view = ls.views.create(
'filters': filters
}
)
tab = ls.views.get(id=view.id)
```
If will be displayed in the data manager as tab with `New tasks to annotate` name.

Expand All @@ -212,12 +213,17 @@ You can use this example filter to prepare completed tasks for review in Label S
Run the following code to export annotations from project's [batch view you created in the previous step](#Create-batch-of-tasks-to-annotate):

```python
tab = ls.views.get(id=view.id)
annotated_tasks = ls.tasks.list(view=tab.id, fields='all')
for annotated_task in annotated_tasks:
print(annotated_task.annotations)
tasks = ls.tasks.list(view=tab.id, fields='all')
for task in tasks:
# You can access annotations in Label Studio JSON format
print(task.annotations)
# And also annotation drafts and predictions
print(task.predictions)
print(task.drafts)
```

Read more about export formats in the [Label Studio SDK documentation](https://labelstud.io/guide/export).

## Handling Errors

If you encounter an error while using the Label Studio Python SDK, you can catch the error and handle it in your script.
Expand Down

0 comments on commit de4235d

Please sign in to comment.