|
59 | 59 | "if COLAB:\n", |
60 | 60 | " !pip install colab-env -qU\n", |
61 | 61 | " from colab_env import envvar_handler\n", |
62 | | - " envvar_handler.envload() \n", |
| 62 | + " envvar_handler.envload()\n", |
63 | 63 | "\n", |
64 | 64 | "API_KEY = os.environ.get(\"LABELBOX_API_KEY\")\n", |
65 | 65 | "if not os.environ.get(\"LABELBOX_API_KEY\"):\n", |
|
220 | 220 | "source": [ |
221 | 221 | "# Bulk create data_rows\n", |
222 | 222 | "task1 = dataset.create_data_rows([{\n", |
223 | | - " DataRow.row_data:\n", |
224 | | - " \"https://picsum.photos/200/300\"\n", |
| 223 | + " DataRow.row_data: \"https://picsum.photos/200/300\"\n", |
225 | 224 | "}, {\n", |
226 | | - " DataRow.row_data:\n", |
227 | | - " \"https://picsum.photos/200/300\"\n", |
| 225 | + " DataRow.row_data: \"https://picsum.photos/200/300\"\n", |
228 | 226 | "}])" |
229 | 227 | ] |
230 | 228 | }, |
|
252 | 250 | "source": [ |
253 | 251 | "# You can mix local files with urls\n", |
254 | 252 | "task3 = dataset.create_data_rows([{\n", |
255 | | - " DataRow.row_data:\n", |
256 | | - " \"https://picsum.photos/200/300\"\n", |
| 253 | + " DataRow.row_data: \"https://picsum.photos/200/300\"\n", |
257 | 254 | "}, local_data_path])" |
258 | 255 | ] |
259 | 256 | }, |
|
346 | 343 | "source": [ |
347 | 344 | "# We can also attach metadata (See metadata tutorial for more)\n", |
348 | 345 | "# Metadata is visible for all projects with this data_row attached\n", |
349 | | - "data_row.create_metadata(meta_type = \"TEXT\", meta_value = \"LABELERS WILL SEE THIS \")\n", |
| 346 | + "data_row.create_metadata(meta_type=\"TEXT\", meta_value=\"LABELERS WILL SEE THIS \")\n", |
350 | 347 | "# See more information here:\n", |
351 | 348 | "# https://docs.labelbox.com/en/import-data/attachments\n", |
352 | 349 | "# Note that meta_value must always be a string (url to a video/image or a text value to display)" |
|
0 commit comments