Skip to content

Commit 63fd6d7

Browse files
committed
fix: importer and exporter
1 parent 13a25f4 commit 63fd6d7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

exporter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import os
2-
import requests
32
import time
43
from contextlib import closing
4+
5+
import requests
56
from label_studio_sdk import Client
67

78
from ProgressBar import ProgressBar
8-
from const import LABEL_STUDIO_URL, API_KEY, EXPORT_PATH, IMPORT_PATH, PROJ_ID
9+
from const import LABEL_STUDIO_URL, API_KEY, EXPORT_PATH, PROJ_ID
910

1011
headers = {
1112
'Authorization': 'Token ' + API_KEY,

importer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Import the SDK and the client module
22
import asyncio
33
import os
4+
45
import requests
56
from label_studio_sdk import Client
67

7-
from const import LABEL_STUDIO_URL, API_KEY, EXPORT_PATH, IMPORT_PATH, PROJ_ID
8+
from const import LABEL_STUDIO_URL, API_KEY, IMPORT_PATH, PROJ_ID
89

910

1011
async def upload_img(path):
@@ -27,7 +28,7 @@ async def main():
2728
else:
2829
print('Connection Succeeds!')
2930
# Find the files in ./img
30-
for root, dir, file in os.walk(IMPORT_PATH):
31+
for root, directory, file in os.walk(IMPORT_PATH):
3132
break
3233
response_table = []
3334
for uploader in asyncio.as_completed(map(upload_img, file)):

0 commit comments

Comments
 (0)