Skip to content

Commit b641ffd

Browse files
committed
feat: use set
1 parent a3f726f commit b641ffd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app_gradio/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ def dingo_demo(
176176
executor = Executor.exec_map["local"](input_args)
177177
summary = executor.execute().to_dict()
178178
detail = executor.get_bad_info_list()
179-
dingo_id_list = []
179+
dingo_id_set = set()
180180
new_detail = []
181181
for item in detail:
182-
if item['dingo_id'] not in dingo_id_list:
183-
dingo_id_list.append(item['dingo_id'])
182+
if item['dingo_id'] not in dingo_id_set:
183+
dingo_id_set.add(item['dingo_id'])
184184
new_detail.append(item)
185185
if summary['output_path']:
186186
if remove_output == "true":

0 commit comments

Comments
 (0)