Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -85,21 +85,25 @@ def upd_drop(lvl_1,lvl_2,lvl_3,lvl_4,lvl_5,fetch_url,config="TEST",split="test",
|
|
85 |
out2=None
|
86 |
out3=None
|
87 |
out4=None
|
88 |
-
|
|
|
|
|
|
|
|
|
89 |
if lvl_1 !="" and lvl_1 != None:
|
90 |
-
for ea in (
|
91 |
box_1.append(ea)
|
92 |
out= gr.update(choices = [m for m in box_1])
|
93 |
if lvl_2 !="" and lvl_2 != None:
|
94 |
-
for ea in (
|
95 |
box_2.append(ea[lvl_2])
|
96 |
out= gr.update(choices = [m for m in box_2])
|
97 |
if lvl_3 !="" and lvl_3 != None:
|
98 |
-
for ea in (
|
99 |
box_3.append(ea[lvl_2][lvl_3])
|
100 |
out= gr.update(choices = [m for m in box_3])
|
101 |
if lvl_4 !="" and lvl_4 != None:
|
102 |
-
for ea in (
|
103 |
box_4.append(ea[lvl_2][lvl_3][lvl_4])
|
104 |
out= gr.update(choices = [m for m in box_4])
|
105 |
return out
|
|
|
85 |
out2=None
|
86 |
out3=None
|
87 |
out4=None
|
88 |
+
if lvl_1 == "rows":
|
89 |
+
lvl_src= out_json[lvl_1][0]
|
90 |
+
else:
|
91 |
+
lvl_src=out_json[lvl_1]
|
92 |
+
|
93 |
if lvl_1 !="" and lvl_1 != None:
|
94 |
+
for ea in (lvl_src):
|
95 |
box_1.append(ea)
|
96 |
out= gr.update(choices = [m for m in box_1])
|
97 |
if lvl_2 !="" and lvl_2 != None:
|
98 |
+
for ea in (lvl_src):
|
99 |
box_2.append(ea[lvl_2])
|
100 |
out= gr.update(choices = [m for m in box_2])
|
101 |
if lvl_3 !="" and lvl_3 != None:
|
102 |
+
for ea in (lvl_src):
|
103 |
box_3.append(ea[lvl_2][lvl_3])
|
104 |
out= gr.update(choices = [m for m in box_3])
|
105 |
if lvl_4 !="" and lvl_4 != None:
|
106 |
+
for ea in (lvl_src):
|
107 |
box_4.append(ea[lvl_2][lvl_3][lvl_4])
|
108 |
out= gr.update(choices = [m for m in box_4])
|
109 |
return out
|