When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.
It shows gradio\blocks.py:1990 in launch error.
I use VPN, and i tried ‘set no_proxy=localhost, 127.0.0.1, ::1’ but it doesnt work.
I just workaround this issue by adding these codes in
ChatWithRTX\RAG\trt-llm-rag-windows-main\app.py
os.environ["no_proxy"] = "127.0.0.1,localhost"
os.environ["http_proxy"] = "http://proxy_host:proxy_port"
os.environ["https_proxy"] = "http://proxy_host:proxy_port"
Thanks for your reply, somehow here comes another problem:
requests.exceptions.InvalidURL: Failed to parse: http://proxy_host:proxy_port
find\NVIDIA\ChatWithRTX\env_nvd_rag\Lib\site-packages\gradio\blocks.py
找到下列代码,替换修改部分,注意缩进:
utils.launch_counter()
self.is_sagemaker = utils.sagemaker_check()
# 修改部分开始
if share is None:
if self.is_colab or not networking.url_ok(self.local_url):
if not quiet:
print(
"Creating a shareable link because localhost is not accessible. Setting `share=True` (you can turn this off by setting `share=False` in `launch()` explicitly).\n"
)
self.share = True
else:
self.share = False
else:
self.share = share
# 修改部分结束
# If running in a colab or not able to access localhost,
# a shareable link must be created.