Sofian Hadiwijaya
commited on
Commit
•
9fca8f0
1
Parent(s):
60431ca
add subprocess on app
Browse files- app.py +6 -1
- packages.txt +1 -0
- requirements.txt +3 -3
app.py
CHANGED
@@ -24,6 +24,12 @@ import copy
|
|
24 |
from argparse import Namespace
|
25 |
import shutil
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
from musetalk.utils.utils import get_file_type,get_video_fps,datagen
|
28 |
from musetalk.utils.preprocessing import get_landmark_and_bbox,read_imgs,coord_placeholder
|
29 |
from musetalk.utils.blending import get_image
|
@@ -32,7 +38,6 @@ from musetalk.utils.utils import load_all_model
|
|
32 |
ProjectDir = os.path.abspath(os.path.dirname(__file__))
|
33 |
CheckpointsDir = os.path.join(ProjectDir, "checkpoints")
|
34 |
|
35 |
-
|
36 |
@spaces.GPU(duration=600)
|
37 |
@torch.no_grad()
|
38 |
def inference(audio_path,video_path,bbox_shift,progress=gr.Progress(track_tqdm=True)):
|
|
|
24 |
from argparse import Namespace
|
25 |
import shutil
|
26 |
|
27 |
+
subprocess.run(["pip", "install", "--no-cache-dir", "-U", "openmim"])
|
28 |
+
subprocess.run(["mim", "install", "mmengine"])
|
29 |
+
subprocess.run(["mim", "install", "mmcv>=2.0.1"])
|
30 |
+
subprocess.run(["mim", "install", "mmdet>=3.1.0"])
|
31 |
+
subprocess.run(["mim", "install", "mmpose>=1.1.0"])
|
32 |
+
|
33 |
from musetalk.utils.utils import get_file_type,get_video_fps,datagen
|
34 |
from musetalk.utils.preprocessing import get_landmark_and_bbox,read_imgs,coord_placeholder
|
35 |
from musetalk.utils.blending import get_image
|
|
|
38 |
ProjectDir = os.path.abspath(os.path.dirname(__file__))
|
39 |
CheckpointsDir = os.path.join(ProjectDir, "checkpoints")
|
40 |
|
|
|
41 |
@spaces.GPU(duration=600)
|
42 |
@torch.no_grad()
|
43 |
def inference(audio_path,video_path,bbox_shift,progress=gr.Progress(track_tqdm=True)):
|
packages.txt
CHANGED
@@ -19,3 +19,4 @@ libopencore-amrnb-dev
|
|
19 |
libopencore-amrwb-dev
|
20 |
libvo-amrwbenc-dev
|
21 |
ffmpeg
|
|
|
|
19 |
libopencore-amrwb-dev
|
20 |
libvo-amrwbenc-dev
|
21 |
ffmpeg
|
22 |
+
libgl1-mesa-glx
|
requirements.txt
CHANGED
@@ -25,10 +25,10 @@ git+https://github.com/TMElyralab/controlnet_aux.git@tme
|
|
25 |
git+https://github.com/tencent-ailab/IP-Adapter.git@main
|
26 |
git+https://github.com/openai/CLIP.git@main
|
27 |
|
28 |
-
|
|
|
|
|
29 |
mmcv==2.1.0 -f https://download.openmmlab.com/mmcv/dist/cu117/torch2.0/index.html
|
30 |
-
mmpose
|
31 |
-
mmdet
|
32 |
|
33 |
requests
|
34 |
gdown
|
|
|
25 |
git+https://github.com/tencent-ailab/IP-Adapter.git@main
|
26 |
git+https://github.com/openai/CLIP.git@main
|
27 |
|
28 |
+
mmdet==3.3.0
|
29 |
+
mmpose==1.3.2
|
30 |
+
mmengine==0.10.5
|
31 |
mmcv==2.1.0 -f https://download.openmmlab.com/mmcv/dist/cu117/torch2.0/index.html
|
|
|
|
|
32 |
|
33 |
requests
|
34 |
gdown
|