Omnibus commited on
Commit
f7ad25a
·
1 Parent(s): 089bad2

Update chatchain.py

Browse files
Files changed (1) hide show
  1. chatchain.py +11 -0
chatchain.py CHANGED
@@ -9,6 +9,17 @@ api = HfApi(token=token_self)
9
  chain_d="chain1.json"
10
  chain_t="trans1.json"
11
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  class MyChainSend:
14
 
 
9
  chain_d="chain1.json"
10
  chain_t="trans1.json"
11
 
12
+ def update_rec_list():
13
+ f_ist = (api.list_repo_files(repo_id=f'{repo}/{name}', repo_type="dataset"))
14
+ rec_list =[]
15
+ for i,ea in enumerate(f_ist):
16
+ if "balance/" in ea:
17
+ try:
18
+ if not "__Source__" in ea:
19
+ rec_list.append(ea.split("/",1)[1].split(".",1)[0])
20
+ except Exception:
21
+ pass
22
+ return rec_list, gr.Dropdown.update(label="Recipient", choices=[f for f in rec_list])
23
 
24
  class MyChainSend:
25