Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -41,6 +41,11 @@ def chdr(apol,prompt,modil,stips,fnamo,gaul):
|
|
41 |
json.dump(dobj, f)
|
42 |
HfApi.upload_folder(repo_id="JoPmt/hf_community_images",folder_path="./tmpo",repo_type="dataset",path_in_repo="./",token=HF_TOKEN)
|
43 |
dobj={'img_name':fnamo,'model':modil,'lora':los,'prompt':prompt,'steps':stips,'type':type,'haed':gaul,}
|
|
|
|
|
|
|
|
|
|
|
44 |
with open(tre, 'w') as f:
|
45 |
json.dump(dobj, f)
|
46 |
HfApi.upload_folder(repo_id="JoPmt/Tst_datast_imgs",folder_path="./tmpo",repo_type="dataset",path_in_repo="./",token=HF_TOKEN)
|
|
|
41 |
json.dump(dobj, f)
|
42 |
HfApi.upload_folder(repo_id="JoPmt/hf_community_images",folder_path="./tmpo",repo_type="dataset",path_in_repo="./",token=HF_TOKEN)
|
43 |
dobj={'img_name':fnamo,'model':modil,'lora':los,'prompt':prompt,'steps':stips,'type':type,'haed':gaul,}
|
44 |
+
try:
|
45 |
+
for pxn in glob.glob('./tmpo/*.png'):
|
46 |
+
os.remove(pxn)
|
47 |
+
except:
|
48 |
+
print("lou")
|
49 |
with open(tre, 'w') as f:
|
50 |
json.dump(dobj, f)
|
51 |
HfApi.upload_folder(repo_id="JoPmt/Tst_datast_imgs",folder_path="./tmpo",repo_type="dataset",path_in_repo="./",token=HF_TOKEN)
|