JoPmt commited on
Commit
0f8be84
1 Parent(s): 26055b4

Update app.py

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