Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,6 +57,7 @@ def chdr(apol,prompt,modil,los,stips,gaul):
|
|
| 57 |
else:
|
| 58 |
dobj={'img_name':fnamo,'model':modil,'lora':los,'prompt':prompt,'steps':stips,'type':type}
|
| 59 |
tre='./tmpo/'+fnamo+'.json'
|
|
|
|
| 60 |
with open(tre, 'w') as f:
|
| 61 |
json.dump(dobj, f)
|
| 62 |
HfApi.upload_folder(repo_id="JoPmt/hf_community_images",folder_path="./tmpo",repo_type="dataset",path_in_repo="./",token=HF_TOKEN)
|
|
@@ -65,9 +66,9 @@ def chdr(apol,prompt,modil,los,stips,gaul):
|
|
| 65 |
with open(tre, 'w') as f:
|
| 66 |
json.dump(dobj, f)
|
| 67 |
HfApi.upload_folder(repo_id="JoPmt/Tst_datast_imgs",folder_path="./tmpo",repo_type="dataset",path_in_repo="./",token=HF_TOKEN)
|
| 68 |
-
try:
|
| 69 |
-
del
|
| 70 |
-
del
|
| 71 |
except:
|
| 72 |
print("cant")
|
| 73 |
except:
|
|
|
|
| 57 |
else:
|
| 58 |
dobj={'img_name':fnamo,'model':modil,'lora':los,'prompt':prompt,'steps':stips,'type':type}
|
| 59 |
tre='./tmpo/'+fnamo+'.json'
|
| 60 |
+
tra='./tmpo/'+fnamo+'.png'
|
| 61 |
with open(tre, 'w') as f:
|
| 62 |
json.dump(dobj, f)
|
| 63 |
HfApi.upload_folder(repo_id="JoPmt/hf_community_images",folder_path="./tmpo",repo_type="dataset",path_in_repo="./",token=HF_TOKEN)
|
|
|
|
| 66 |
with open(tre, 'w') as f:
|
| 67 |
json.dump(dobj, f)
|
| 68 |
HfApi.upload_folder(repo_id="JoPmt/Tst_datast_imgs",folder_path="./tmpo",repo_type="dataset",path_in_repo="./",token=HF_TOKEN)
|
| 69 |
+
try:
|
| 70 |
+
del tre
|
| 71 |
+
del tra
|
| 72 |
except:
|
| 73 |
print("cant")
|
| 74 |
except:
|