JoPmt commited on
Commit
9bae2e4
1 Parent(s): 7e2eb14

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,7 +2,7 @@ from diffusers import DiffusionPipeline
2
  import torch
3
  import gradio as gr
4
  from PIL import Image
5
- import os, random, gc, re, json, time
6
  import PIL.Image
7
  import tqdm
8
  from accelerate import Accelerator
@@ -65,6 +65,7 @@ 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
  except:
69
  print("failed to umake obj")
70
 
 
2
  import torch
3
  import gradio as gr
4
  from PIL import Image
5
+ import os, random, gc, re, json, time, shutil
6
  import PIL.Image
7
  import tqdm
8
  from accelerate import Accelerator
 
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
+ shutil.rmtree('./tmpo')
69
  except:
70
  print("failed to umake obj")
71