|
@ -3,6 +3,8 @@ |
|
|
# 按 Shift+F10 执行或将其替换为您的代码。 |
|
|
# 按 Shift+F10 执行或将其替换为您的代码。 |
|
|
# 按 双击 Shift 在所有地方搜索类、文件、工具窗口、操作和设置。 |
|
|
# 按 双击 Shift 在所有地方搜索类、文件、工具窗口、操作和设置。 |
|
|
import os |
|
|
import os |
|
|
|
|
|
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" |
|
|
|
|
|
os.environ["CUDA_VISIBLE_DEVICES"] = "-1" |
|
|
import faiss |
|
|
import faiss |
|
|
import numpy as np |
|
|
import numpy as np |
|
|
from tqdm import tqdm |
|
|
from tqdm import tqdm |
|
@ -260,8 +262,12 @@ async def main_api(): |
|
|
ssl_context = None |
|
|
ssl_context = None |
|
|
|
|
|
|
|
|
# 检查证书文件是否存在 |
|
|
# 检查证书文件是否存在 |
|
|
ssl_cert = "yizherenxin.cn.crt" |
|
|
|
|
|
ssl_key = "yizherenxin.cn.key" |
|
|
ssl_cert = "yitongtang66.com.crt" |
|
|
|
|
|
ssl_key = "yitongtang66.com.key" |
|
|
|
|
|
|
|
|
|
|
|
# ssl_cert = "yizherenxin.cn.crt" |
|
|
|
|
|
# ssl_key = "yizherenxin.cn.key" |
|
|
|
|
|
|
|
|
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) |
|
|
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) |
|
|
ssl_context.load_cert_chain(ssl_cert, ssl_key) |
|
|
ssl_context.load_cert_chain(ssl_cert, ssl_key) |
|
|