Jirat Jaturanpinyo commited on
Commit
3beaca3
·
verified ·
1 Parent(s): c345d9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -6
app.py CHANGED
@@ -1,6 +1,20 @@
1
- import os
2
- from subprocess import Popen
3
-
4
- command = ["mercury", "run", f"0.0.0.0:{os.environ.get('PORT', 7860)}"]
5
- worker = Popen(command)
6
- worker.wait()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import subprocess
2
+
3
+ # Download the voicevox engine archive
4
+ subprocess.run(['wget', 'https://github.com/VOICEVOX/voicevox_engine/releases/download/0.19.1/voicevox_engine-linux-cpu-0.19.1.7z.001'])
5
+
6
+ # Install p7zip to extract the .7z archive
7
+ subprocess.run(['apt-get', 'update', '-y'])
8
+ subprocess.run(['apt-get', 'install', '-y', 'p7zip-full'])
9
+
10
+ # Extract the archive
11
+ subprocess.run(['7z', 'x', 'voicevox_engine-linux-cpu-0.19.1.7z.001'])
12
+
13
+ # Clean up the downloaded archive
14
+ subprocess.run(['rm', 'voicevox_engine-linux-cpu-0.19.1.7z.001'])
15
+
16
+ # Clone voicevox engine repository
17
+ subprocess.run(['git', 'clone', 'https://github.com/VOICEVOX/voicevox_engine', '-q'])
18
+
19
+ # Install necessary packages for voicevox engine and llama.cpp public url
20
+ subprocess.run(['npm', 'install', '-g', 'localtunnel', '-q'])