From 3f1390a62c1096178feb79da14a4b585c5580d4d Mon Sep 17 00:00:00 2001 From: xgdyp Date: Fri, 6 Aug 2021 11:37:54 +0800 Subject: [PATCH] add get_labels --- be/app/api/v1/files.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/be/app/api/v1/files.py b/be/app/api/v1/files.py index de231fa..462ed7d 100644 --- a/be/app/api/v1/files.py +++ b/be/app/api/v1/files.py @@ -69,7 +69,6 @@ def get_lables(): # current_filename = request.args.get("current_filename") download_json = [] anno_data = read_json_file(PROJECT_PATH.format(project_name) + '/anno.json') - print(len(anno_data)) for item in anno_data: item_dict = {'file': item['fileName'], @@ -77,12 +76,6 @@ def get_lables(): 'labels': list(set([x['type'] for x in item["annoDetails"]]))} print(item_dict) download_json.append(item_dict) - # for detail in item["annoDetails"]: - # label_set = set() - # label_set.add(detail['type']) - # item_dict['labels'] = list(label_set) - # download_json.append(item_dict) - # print(download_json) except Exception as e: ret_info.errCode = 404 ret_info.errMsg = str(e)