Spaces:
Running
on
Zero
Running
on
Zero
Update inference_gradio.py
Browse files- inference_gradio.py +4 -6
inference_gradio.py
CHANGED
|
@@ -42,8 +42,8 @@ langid.set_languages(['es','pt','zh','en','de','fr','it', 'ru', 'id', 'vi'])
|
|
| 42 |
|
| 43 |
|
| 44 |
os.environ['CURL_CA_BUNDLE'] = ''
|
| 45 |
-
DEMO_PATH = os.getenv("DEMO_PATH", "./demo")
|
| 46 |
-
TMP_PATH = os.getenv("TMP_PATH", "./demo/temp")
|
| 47 |
MODELS_PATH = os.getenv("MODELS_PATH", "./pretrained_models")
|
| 48 |
|
| 49 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
@@ -947,8 +947,7 @@ def get_app():
|
|
| 947 |
# InvalidPathError with local filesystem paths.
|
| 948 |
_demo_value = None
|
| 949 |
demo_candidates = [
|
| 950 |
-
os.path.join(DEMO_PATH, "
|
| 951 |
-
os.path.join(os.path.dirname(__file__), "..", "VoiceCraft", "demo", "V-00013_en-US.wav"),
|
| 952 |
]
|
| 953 |
for demo_path in demo_candidates:
|
| 954 |
try:
|
|
@@ -1181,8 +1180,7 @@ if __name__ == "__main__":
|
|
| 1181 |
parser = argparse.ArgumentParser(description="VoiceCraft gradio app.")
|
| 1182 |
|
| 1183 |
parser.add_argument("--demo-path", default="./demo", help="Path to demo directory")
|
| 1184 |
-
parser.add_argument("--tmp-path", default="/
|
| 1185 |
-
parser.add_argument("--models-path", default="/cto_labs/vistring/zhaozhiyuan/outputs/voicecraft/pretrain/VoiceCraft", help="Path to voicecraft models directory")
|
| 1186 |
parser.add_argument("--port", default=41020, type=int, help="App port")
|
| 1187 |
parser.add_argument("--share", action="store_true", help="Launch with public url")
|
| 1188 |
parser.add_argument("--server_name", default="0.0.0.0", type=str, help="Server name for launching the app. 127.0.0.1 for localhost; 0.0.0.0 to allow access from other machines in the local network. Might also give access to external users depends on the firewall settings.")
|
|
|
|
| 42 |
|
| 43 |
|
| 44 |
os.environ['CURL_CA_BUNDLE'] = ''
|
| 45 |
+
DEMO_PATH = os.getenv("DEMO_PATH", "./pretrained_models/demo")
|
| 46 |
+
TMP_PATH = os.getenv("TMP_PATH", "./pretrained_models/demo/temp")
|
| 47 |
MODELS_PATH = os.getenv("MODELS_PATH", "./pretrained_models")
|
| 48 |
|
| 49 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
| 947 |
# InvalidPathError with local filesystem paths.
|
| 948 |
_demo_value = None
|
| 949 |
demo_candidates = [
|
| 950 |
+
os.path.join(DEMO_PATH, "test.wav"),
|
|
|
|
| 951 |
]
|
| 952 |
for demo_path in demo_candidates:
|
| 953 |
try:
|
|
|
|
| 1180 |
parser = argparse.ArgumentParser(description="VoiceCraft gradio app.")
|
| 1181 |
|
| 1182 |
parser.add_argument("--demo-path", default="./demo", help="Path to demo directory")
|
| 1183 |
+
parser.add_argument("--tmp-path", default="./pretrained_models/demo/tmp", help="Path to tmp directory")
|
|
|
|
| 1184 |
parser.add_argument("--port", default=41020, type=int, help="App port")
|
| 1185 |
parser.add_argument("--share", action="store_true", help="Launch with public url")
|
| 1186 |
parser.add_argument("--server_name", default="0.0.0.0", type=str, help="Server name for launching the app. 127.0.0.1 for localhost; 0.0.0.0 to allow access from other machines in the local network. Might also give access to external users depends on the firewall settings.")
|