From 78a83be67ea61685406c75f633e528806f60f359 Mon Sep 17 00:00:00 2001 From: ovalle15 Date: Tue, 8 Aug 2023 13:23:08 -0400 Subject: [PATCH 1/4] Updates to project notebook and delete labels notebook --- examples/basics/labels.ipynb | 308 --------------------------------- examples/basics/projects.ipynb | 80 ++++++--- 2 files changed, 55 insertions(+), 333 deletions(-) delete mode 100644 examples/basics/labels.ipynb diff --git a/examples/basics/labels.ipynb b/examples/basics/labels.ipynb deleted file mode 100644 index 63371079e..000000000 --- a/examples/basics/labels.ipynb +++ /dev/null @@ -1,308 +0,0 @@ -{ - "nbformat": 4, - "nbformat_minor": 5, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "\n", - " \n", - "" - ], - "cell_type": "markdown" - }, - { - "metadata": {}, - "source": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "" - ], - "cell_type": "markdown" - }, - { - "metadata": {}, - "source": [ - "# Labels" - ], - "cell_type": "markdown" - }, - { - "metadata": {}, - "source": [ - "#### *** This section explains how to use the Label object but It is reccomended that you use bulk export for exporting labels *** \n", - "* [Export data](https://github.com/Labelbox/labelbox-python/tree/master/examples/basics/export_data.ipynb)\n", - "* [Label format documentation](https://docs.labelbox.com/data-model/en/index-en#label)" - ], - "cell_type": "markdown" - }, - { - "metadata": {}, - "source": [ - "!pip install labelbox" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "import labelbox as lb\n", - "import json\n", - "import os" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "* Set the following cell with your data to run this notebook" - ], - "cell_type": "markdown" - }, - { - "metadata": {}, - "source": [ - "# Pick a project that has labels\n", - "PROJECT_ID = \"ckmdx02yhzsrt0757owj3aprx\"" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "# API Key and Client\n", - "Provide a valid api key below in order to properly connect to the Labelbox Client." - ], - "cell_type": "markdown" - }, - { - "metadata": {}, - "source": [ - "# Add your api key\n", - "API_KEY = None\n", - "client = lb.Client(api_key=API_KEY)\n", - "project = client.get_project(PROJECT_ID)" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "### Read" - ], - "cell_type": "markdown" - }, - { - "metadata": {}, - "source": [ - "# Use relationship to get labels\n", - "labels = project.labels()" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "# Get the first label in the dataset\n", - "label = next(labels)" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "label" - ], - "cell_type": "code", - "outputs": [ - { - "data": { - "text/plain": [ - "