Omnibus commited on
Commit
f0e40c4
1 Parent(s): e1ee37b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -89,7 +89,7 @@ def upd_drop(lvl_1=None,lvl_2=None,lvl_3=None,lvl_4=None,lvl_5=None,fetch_url=""
89
  lvl_src= out_json[lvl_1][0]
90
  else:
91
  lvl_src=out_json[lvl_1]
92
- print (lvl_src)
93
  if lvl_1 !="" and lvl_1 != None:
94
  for ea in (lvl_src):
95
  box_1.append(ea)
@@ -99,14 +99,20 @@ def upd_drop(lvl_1=None,lvl_2=None,lvl_3=None,lvl_4=None,lvl_5=None,fetch_url=""
99
  print (ea)
100
  box_2.append(ea)
101
  out= gr.update(choices = [m for m in box_2])
 
 
102
  if lvl_3 !="" and lvl_3 != None:
103
  for ea in (lvl_src):
104
  box_3.append(ea[lvl_2][lvl_3])
105
  out= gr.update(choices = [m for m in box_3])
 
 
106
  if lvl_4 !="" and lvl_4 != None:
107
  for ea in (lvl_src):
108
  box_4.append(ea[lvl_2][lvl_3][lvl_4])
109
  out= gr.update(choices = [m for m in box_4])
 
 
110
  return out
111
  def find_items(lvl_1,lvl_2,lvl_3,lvl_4,lvl_5,fetch_url,config="TEST",split="test",offset=0,length=10):
112
  out_json,_=query2(fetch_url,config,split,offset=10,length=20)
 
89
  lvl_src= out_json[lvl_1][0]
90
  else:
91
  lvl_src=out_json[lvl_1]
92
+ print (f"lvl_src:: {lvl_src}")
93
  if lvl_1 !="" and lvl_1 != None:
94
  for ea in (lvl_src):
95
  box_1.append(ea)
 
99
  print (ea)
100
  box_2.append(ea)
101
  out= gr.update(choices = [m for m in box_2])
102
+ else:
103
+ pass
104
  if lvl_3 !="" and lvl_3 != None:
105
  for ea in (lvl_src):
106
  box_3.append(ea[lvl_2][lvl_3])
107
  out= gr.update(choices = [m for m in box_3])
108
+ else:
109
+ pass
110
  if lvl_4 !="" and lvl_4 != None:
111
  for ea in (lvl_src):
112
  box_4.append(ea[lvl_2][lvl_3][lvl_4])
113
  out= gr.update(choices = [m for m in box_4])
114
+ else:
115
+ pass
116
  return out
117
  def find_items(lvl_1,lvl_2,lvl_3,lvl_4,lvl_5,fetch_url,config="TEST",split="test",offset=0,length=10):
118
  out_json,_=query2(fetch_url,config,split,offset=10,length=20)