r3gm commited on
Commit
f68cd82
1 Parent(s): 516aaf6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -1,10 +1,26 @@
1
  import os, sys
2
  os.system("pip install pyworld") # ==0.3.3
 
3
  now_dir = os.getcwd()
4
  sys.path.append(now_dir)
5
  os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
6
  os.environ["OPENBLAS_NUM_THREADS"] = "1"
7
  os.environ["no_proxy"] = "localhost, 127.0.0.1, ::1"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  import logging
9
  import shutil
10
  import threading
 
1
  import os, sys
2
  os.system("pip install pyworld") # ==0.3.3
3
+
4
  now_dir = os.getcwd()
5
  sys.path.append(now_dir)
6
  os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
7
  os.environ["OPENBLAS_NUM_THREADS"] = "1"
8
  os.environ["no_proxy"] = "localhost, 127.0.0.1, ::1"
9
+
10
+ # Download models
11
+ import subprocess
12
+ shell_script = './tools/dlmodels.sh'
13
+ try:
14
+ subprocess.run(shell_script, shell=True, check=True)
15
+ print("Shell script executed successfully.")
16
+ except subprocess.CalledProcessError as e:
17
+ print(f"Error running shell script: {e}")
18
+ except FileNotFoundError:
19
+ print(f"Shell script not found: {shell_script}")
20
+ except Exception as e:
21
+ print(f"An error occurred: {e}")
22
+
23
+
24
  import logging
25
  import shutil
26
  import threading