6drf21e / ChatTTS_colab

🚀 一键部署(含离线整合包)!基于 ChatTTS ,支持流式输出、音色抽卡、长音频生成和分角色朗读。简单易用,无需复杂安装。
2.12k stars 266 forks source link

不仅仅是监听127.0.0.1,想要监听其他地址 #88

Closed HzTTT closed 5 days ago

HzTTT commented 2 months ago

我在docker部署的该项目,但是如果只监听127.0.0.1的话docker外面无法访问。 尝试在容器内部署nginx进行转发,但是web端重定向的地址仍为127.0.0.1

image
yellowcaicai commented 1 month ago

直接反代

Mistzhao1010 commented 1 month ago

修改webui_mix.py文件,最后一行参数里增加server_name='0.0.0.0'

demo.launch(share=args.share, inbrowser=True, server_name='0.0.0.0')

启动日志

INFO:ChatTTS.core:tokenizer loaded.
INFO:ChatTTS.core:All initialized.
* Running on local URL:  http://0.0.0.0:7860
INFO:httpx:HTTP Request: GET http://localhost:7860/gradio_api/startup-events "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: HEAD http://localhost:7860/ "HTTP/1.1 200 OK"

To create a public link, set `share=True` in `launch()`.
INFO:httpx:HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK"