support SSL(https)
Browse files
app.py
CHANGED
@@ -592,18 +592,18 @@ def lunch_style(demo):
|
|
592 |
|
593 |
if len(sys.argv)==1:
|
594 |
print("running server as default value")
|
595 |
-
demo.launch(share=True, allowed_paths=[root_file_path, root_file_path+hr_source_path])
|
596 |
elif len(sys.argv)==2 and sys.argv[1] == "server":
|
597 |
local_ip = "10.51.50.39"
|
598 |
local_port = int(3100)
|
599 |
print(f"running server on http://{local_ip}:{local_port}")
|
600 |
-
demo.launch(share=True, allowed_paths=[root_file_path, root_file_path+hr_source_path],auth=("Foxconn", "Foxconn123!"),server_name=local_ip, server_port=local_port)
|
601 |
elif len(sys.argv)==4:
|
602 |
local_ip = sys.argv[2]
|
603 |
local_port = sys.argv[3]
|
604 |
print(f"running server on http://{local_ip}:{local_port}")
|
605 |
_local_port = int(local_port)
|
606 |
-
demo.launch(share=True, allowed_paths=[root_file_path, root_file_path+hr_source_path],auth=("Foxconn", "Foxconn123!"),server_name=local_ip, server_port=_local_port)
|
607 |
else:
|
608 |
print("syntax: python <your_app>.py [server {ip_address, port}] ")
|
609 |
|
|
|
592 |
|
593 |
if len(sys.argv)==1:
|
594 |
print("running server as default value")
|
595 |
+
demo.launch(ssl_verify=False, share=True, allowed_paths=[root_file_path, root_file_path+hr_source_path])
|
596 |
elif len(sys.argv)==2 and sys.argv[1] == "server":
|
597 |
local_ip = "10.51.50.39"
|
598 |
local_port = int(3100)
|
599 |
print(f"running server on http://{local_ip}:{local_port}")
|
600 |
+
demo.launch(ssl_verify=False, share=True, allowed_paths=[root_file_path, root_file_path+hr_source_path],auth=("Foxconn", "Foxconn123!"),server_name=local_ip, server_port=local_port)
|
601 |
elif len(sys.argv)==4:
|
602 |
local_ip = sys.argv[2]
|
603 |
local_port = sys.argv[3]
|
604 |
print(f"running server on http://{local_ip}:{local_port}")
|
605 |
_local_port = int(local_port)
|
606 |
+
demo.launch(ssl_verify=False, share=True, allowed_paths=[root_file_path, root_file_path+hr_source_path],auth=("Foxconn", "Foxconn123!"),server_name=local_ip, server_port=_local_port)
|
607 |
else:
|
608 |
print("syntax: python <your_app>.py [server {ip_address, port}] ")
|
609 |
|