Arts-of-coding commited on
Commit
7c65d90
·
1 Parent(s): 41380ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import os
2
  from dotenv import load_dotenv
3
  from subprocess import Popen
 
4
 
5
  load_dotenv()
6
 
@@ -8,9 +9,10 @@ my_env = os.environ.copy()
8
  #
9
  # Please set your username and your Space name
10
  #
 
11
  my_env["HF_SPACE"] = "embed/Arts-of-coding/Corneal_meta-atlas"
12
- CACHED_FOLDER = "/home/user/app/gradio_cached_examples"
13
- os.remove(CACHED_FOLDER)
14
  command = ["mercury", "run", f"0.0.0.0:{os.environ.get('PORT', 7860)}"]
15
  print(command)
16
  worker = Popen(command, env=my_env)
 
1
  import os
2
  from dotenv import load_dotenv
3
  from subprocess import Popen
4
+ import shutil
5
 
6
  load_dotenv()
7
 
 
9
  #
10
  # Please set your username and your Space name
11
  #
12
+
13
  my_env["HF_SPACE"] = "embed/Arts-of-coding/Corneal_meta-atlas"
14
+ CACHED_FOLDER = "~/.cache/gradio_cached_examples"
15
+ shutil.rmtree(CACHED_FOLDER)
16
  command = ["mercury", "run", f"0.0.0.0:{os.environ.get('PORT', 7860)}"]
17
  print(command)
18
  worker = Popen(command, env=my_env)