Spaces:
Running
on
Zero
Running
on
Zero
Update inference_webui.py
Browse files- inference_webui.py +10 -8
inference_webui.py
CHANGED
@@ -94,13 +94,15 @@ from tools.my_utils import load_audio
|
|
94 |
|
95 |
# os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1' # 确保直接启动推理UI时也能够设置。
|
96 |
|
97 |
-
i18n_dict={}
|
98 |
-
json_root="tools/i18n/locale"
|
99 |
-
for name in os.listdir(json_root):
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
i18n=gr.I18n(**i18n_dict)
|
|
|
|
|
104 |
|
105 |
if torch.cuda.is_available():
|
106 |
device = "cuda"
|
@@ -911,5 +913,5 @@ if __name__ == "__main__":
|
|
911 |
server_name="0.0.0.0",
|
912 |
inbrowser=True,
|
913 |
show_api=False,
|
914 |
-
allowed_paths=["/"]
|
915 |
)
|
|
|
94 |
|
95 |
# os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1' # 确保直接启动推理UI时也能够设置。
|
96 |
|
97 |
+
# i18n_dict={}
|
98 |
+
# json_root="tools/i18n/locale"
|
99 |
+
# for name in os.listdir(json_root):
|
100 |
+
# with open("%s/%s"%(json_root,name),"r")as f:
|
101 |
+
# data=json.loads(f.read())
|
102 |
+
# i18n_dict[name.split(".json")[0].replace("_","-")]=data
|
103 |
+
# i18n=gr.I18n(**i18n_dict)
|
104 |
+
|
105 |
+
def i18n(xxx):return xxx
|
106 |
|
107 |
if torch.cuda.is_available():
|
108 |
device = "cuda"
|
|
|
913 |
server_name="0.0.0.0",
|
914 |
inbrowser=True,
|
915 |
show_api=False,
|
916 |
+
allowed_paths=["/"]#,i18n=i18n
|
917 |
)
|