forked from Plachtaa/seed-vc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_entry.py
More file actions
47 lines (30 loc) · 1.06 KB
/
_entry.py
File metadata and controls
47 lines (30 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import os
import sys
import runpy
def _ensure_local_imports():
# Add the installed package directory (seed_vc) into sys.path so intra-package
# absolute imports like `from .modules import ...` continue to work after install.
pkg_dir = os.path.dirname(__file__)
if pkg_dir not in sys.path:
sys.path.insert(0, pkg_dir)
def app():
_ensure_local_imports()
runpy.run_module("seed_vc.app_vc", run_name="__main__")
def app_v2():
_ensure_local_imports()
runpy.run_module("seed_vc.app_vc_v2", run_name="__main__")
def app_combined():
_ensure_local_imports()
runpy.run_module("seed_vc.app", run_name="__main__")
def infer_v1():
_ensure_local_imports()
runpy.run_module("seed_vc.inference", run_name="__main__")
def infer_v2():
_ensure_local_imports()
runpy.run_module("seed_vc.inference_v2", run_name="__main__")
def train():
_ensure_local_imports()
runpy.run_module("seed_vc.train", run_name="__main__")
def eval():
_ensure_local_imports()
runpy.run_module("seed_vc.eval", run_name="__main__")