update
Browse files
main.py
CHANGED
|
@@ -1,5 +1,16 @@
|
|
| 1 |
#!/usr/bin/python3
|
| 2 |
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
import argparse
|
| 4 |
from functools import lru_cache
|
| 5 |
import json
|
|
@@ -32,6 +43,12 @@ def get_args():
|
|
| 32 |
default=(project_path / "data/examples").as_posix(),
|
| 33 |
type=str,
|
| 34 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
args = parser.parse_args()
|
| 36 |
return args
|
| 37 |
|
|
@@ -174,7 +191,7 @@ def main():
|
|
| 174 |
share=False if platform.system() == "Windows" else False,
|
| 175 |
# server_name="127.0.0.1" if platform.system() == "Windows" else "0.0.0.0",
|
| 176 |
server_name="0.0.0.0",
|
| 177 |
-
server_port=
|
| 178 |
)
|
| 179 |
return
|
| 180 |
|
|
|
|
| 1 |
#!/usr/bin/python3
|
| 2 |
# -*- coding: utf-8 -*-
|
| 3 |
+
"""
|
| 4 |
+
docker build -t speech_age_and_gender:v20250626_1616 .
|
| 5 |
+
docker stop speech_age_and_gender_7863 && docker rm speech_age_and_gender_7863
|
| 6 |
+
docker run -itd \
|
| 7 |
+
--name speech_age_and_gender_7863 \
|
| 8 |
+
--restart=always \
|
| 9 |
+
--network host \
|
| 10 |
+
-e server_port=7865 \
|
| 11 |
+
denoise:v20250609_1919 /bin/bash
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
import argparse
|
| 15 |
from functools import lru_cache
|
| 16 |
import json
|
|
|
|
| 43 |
default=(project_path / "data/examples").as_posix(),
|
| 44 |
type=str,
|
| 45 |
)
|
| 46 |
+
parser.add_argument(
|
| 47 |
+
"--server_port",
|
| 48 |
+
default=environment.get("server_port", 7860),
|
| 49 |
+
type=int
|
| 50 |
+
)
|
| 51 |
+
|
| 52 |
args = parser.parse_args()
|
| 53 |
return args
|
| 54 |
|
|
|
|
| 191 |
share=False if platform.system() == "Windows" else False,
|
| 192 |
# server_name="127.0.0.1" if platform.system() == "Windows" else "0.0.0.0",
|
| 193 |
server_name="0.0.0.0",
|
| 194 |
+
server_port=args.server_port
|
| 195 |
)
|
| 196 |
return
|
| 197 |
|