Spaces:
Runtime error
Runtime error
Update chatchain.py
Browse files- chatchain.py +2 -2
chatchain.py
CHANGED
@@ -10,13 +10,13 @@ chain_d="chain1.json"
|
|
10 |
chain_t="trans1.json"
|
11 |
|
12 |
|
13 |
-
def store_image(img,chain_load):
|
14 |
main_chain_im=chain_load
|
15 |
chain_r=f"{main_chain_im.split('datasets/',1)[1].split('/raw',1)[0]}"
|
16 |
try:
|
17 |
api.upload_file(
|
18 |
path_or_fileobj=img,
|
19 |
-
path_in_repo=
|
20 |
repo_id=chain_r,
|
21 |
token=token_self,
|
22 |
repo_type="dataset",
|
|
|
10 |
chain_t="trans1.json"
|
11 |
|
12 |
|
13 |
+
def store_image(img,chain_load,address):
|
14 |
main_chain_im=chain_load
|
15 |
chain_r=f"{main_chain_im.split('datasets/',1)[1].split('/raw',1)[0]}"
|
16 |
try:
|
17 |
api.upload_file(
|
18 |
path_or_fileobj=img,
|
19 |
+
path_in_repo=f'{address}/{address}.png',
|
20 |
repo_id=chain_r,
|
21 |
token=token_self,
|
22 |
repo_type="dataset",
|