https://github.com/teknoir/teknoir-labelstudio-sdk
A wrapper for the Label Studio SDK to run inside a Teknoir Notebook.
https://github.com/teknoir/teknoir-labelstudio-sdk
Last synced: 7 months ago
JSON representation
A wrapper for the Label Studio SDK to run inside a Teknoir Notebook.
- Host: GitHub
- URL: https://github.com/teknoir/teknoir-labelstudio-sdk
- Owner: teknoir
- Created: 2023-11-09T08:20:52.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T17:31:24.000Z (about 1 year ago)
- Last Synced: 2025-01-30T08:43:01.678Z (9 months ago)
- Language: Python
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Teknoir Label Studio SDK
A wrapper for the Label Studio SDK to run inside a Teknoir Notebook.
## Installation
```bash
pip install git+https://github.com/teknoir/teknoir-labelstudio-sdk.git#egg=teknoir-labelstudio-sdk
```## Usage
This library is intended to run inside a Teknoir Notebook, but can also be run locally.
Follow the [Label Studio documentation](https://labelstud.io/guide/sdk) for more information on how to use the SDK.### Teknoir Notebook
```python
import teknoir_labelstudio_sdk
# Connect to the Label Studio API and check the connection
ls = teknoir_labelstudio_sdk.Client(extra_headers=teknoir_labelstudio_sdk.jwt_header('your.name@teknoir.ai'))
print(ls.check_connection())
```### Local
In a separate terminal:
```bash
k port-forward svc/label-studio 8080:80
```
```python
import teknoir_labelstudio_sdk
# Connect to the Label Studio API and check the connection
ls = teknoir_labelstudio_sdk.Client(url='http://localhost:8080', extra_headers=teknoir_labelstudio_sdk.jwt_header('your.name@teknoir.ai'))
print(ls.check_connection())
```## Examples
### Import Pictor PPE
In a separate terminal:
```bash
k port-forward svc/label-studio 8080:80
```Run the example:
```bash
LABEL_STUDIO_URL=http://localhost:8080 GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/teknoir-admin-credentials.json GOOGLE_CLOUD_PROJECT=teknoir python examples/import_pictor_ppe.py
```