JoPmt commited on
Commit
bac6480
1 Parent(s): d75a742

Update app.py

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