JoPmt commited on
Commit
a2bab84
1 Parent(s): a836f21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -122,6 +122,11 @@ def chdr(apol,prompt,modil,los,stips,fnamo,gaul):
122
  json.dump(dobj, f)
123
  HfApi.upload_folder(repo_id="JoPmt/hf_community_images",folder_path="./tmpo",repo_type="dataset",path_in_repo="./",token=HF_TOKEN)
124
  dobj={'img_name':fnamo,'model':modil,'lora':los,'prompt':prompt,'steps':stips,'type':type,'haed':gaul,}
 
 
 
 
 
125
  with open(tre, 'w') as f:
126
  json.dump(dobj, f)
127
  HfApi.upload_folder(repo_id="JoPmt/Tst_datast_imgs",folder_path="./tmpo",repo_type="dataset",path_in_repo="./",token=HF_TOKEN)
 
122
  json.dump(dobj, f)
123
  HfApi.upload_folder(repo_id="JoPmt/hf_community_images",folder_path="./tmpo",repo_type="dataset",path_in_repo="./",token=HF_TOKEN)
124
  dobj={'img_name':fnamo,'model':modil,'lora':los,'prompt':prompt,'steps':stips,'type':type,'haed':gaul,}
125
+ try:
126
+ for pxn in glob.glob('./tmpo/*.png'):
127
+ os.remove(pxn)
128
+ except:
129
+ print("mar")
130
  with open(tre, 'w') as f:
131
  json.dump(dobj, f)
132
  HfApi.upload_folder(repo_id="JoPmt/Tst_datast_imgs",folder_path="./tmpo",repo_type="dataset",path_in_repo="./",token=HF_TOKEN)