Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -46,10 +46,16 @@ def find_fn(lvl_1,lvl_2,fetch_url,config="TEST",split="test",offset=0,length=10)
|
|
46 |
|
47 |
lvl_2=lvl_2.strip('""').strip("''")
|
48 |
#print(inp)
|
|
|
49 |
if lvl_2 != "":
|
|
|
|
|
|
|
|
|
50 |
for ea in out_json[f"{lvl_1}"]:
|
|
|
51 |
#img_ea = ea['row']['image']['src']
|
52 |
-
img_list.append(ea[f"{
|
53 |
if lvl_2 == "":
|
54 |
img_list.append(out_json[lvl_1])
|
55 |
return img_list
|
|
|
46 |
|
47 |
lvl_2=lvl_2.strip('""').strip("''")
|
48 |
#print(inp)
|
49 |
+
cnt_lvl = ""
|
50 |
if lvl_2 != "":
|
51 |
+
ea_lvl_len = len(lvl_2)
|
52 |
+
print (ea_lvl_len)
|
53 |
+
for ea_lvl in lvl_2:
|
54 |
+
cnt_lvl = f'{cnt_lvl}[{ea_lvl}]'
|
55 |
for ea in out_json[f"{lvl_1}"]:
|
56 |
+
cnt_lvl=cnt_lvl.strip("[]")
|
57 |
#img_ea = ea['row']['image']['src']
|
58 |
+
img_list.append(ea[f"{cnt_lvl}"])
|
59 |
if lvl_2 == "":
|
60 |
img_list.append(out_json[lvl_1])
|
61 |
return img_list
|