Spaces:
Runtime error
Runtime error
Update chatchain.py
Browse files- chatchain.py +3 -0
chatchain.py
CHANGED
@@ -25,9 +25,11 @@ def store_image(img,chain_load,address):
|
|
25 |
except Exception as e:
|
26 |
print (f'Error storing image: {e}')
|
27 |
def update_rec_list(main_chain):
|
|
|
28 |
repo = main_chain.split('datasets/',1)[1].split('/raw',1)[0].split('/',1)[0]
|
29 |
name = main_chain.split('datasets/',1)[1].split('/raw',1)[0].split('/',1)[1]
|
30 |
f_ist = (api.list_repo_files(repo_id=f'{repo}/{name}', repo_type="dataset"))
|
|
|
31 |
rec_list =[]
|
32 |
for i,ea in enumerate(f_ist):
|
33 |
if "chat/" in ea:
|
@@ -36,6 +38,7 @@ def update_rec_list(main_chain):
|
|
36 |
rec_list.append(ea.split("/",1)[1])
|
37 |
except Exception:
|
38 |
pass
|
|
|
39 |
return rec_list
|
40 |
|
41 |
class MyChainSend:
|
|
|
25 |
except Exception as e:
|
26 |
print (f'Error storing image: {e}')
|
27 |
def update_rec_list(main_chain):
|
28 |
+
print (main_chain)
|
29 |
repo = main_chain.split('datasets/',1)[1].split('/raw',1)[0].split('/',1)[0]
|
30 |
name = main_chain.split('datasets/',1)[1].split('/raw',1)[0].split('/',1)[1]
|
31 |
f_ist = (api.list_repo_files(repo_id=f'{repo}/{name}', repo_type="dataset"))
|
32 |
+
print (f_ist)
|
33 |
rec_list =[]
|
34 |
for i,ea in enumerate(f_ist):
|
35 |
if "chat/" in ea:
|
|
|
38 |
rec_list.append(ea.split("/",1)[1])
|
39 |
except Exception:
|
40 |
pass
|
41 |
+
print (rec_list)
|
42 |
return rec_list
|
43 |
|
44 |
class MyChainSend:
|