mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-19 20:37:51 +00:00
Update app.py
This commit is contained in:
parent
2f48232790
commit
b5549039a1
8
app.py
8
app.py
@ -51,7 +51,6 @@ app = FastAPI(title="LoLLMS", description="This is the LoLLMS-Webui API document
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
desired_version = (3, 11)
|
desired_version = (3, 11)
|
||||||
|
|
||||||
if not sys.version_info >= desired_version:
|
if not sys.version_info >= desired_version:
|
||||||
ASCIIColors.error(f"Your Python version is {sys.version_info.major}.{sys.version_info.minor}, but version {desired_version[0]}.{desired_version[1]} or higher is required.")
|
ASCIIColors.error(f"Your Python version is {sys.version_info.major}.{sys.version_info.minor}, but version {desired_version[0]}.{desired_version[1]} or higher is required.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -75,6 +74,13 @@ if __name__ == "__main__":
|
|||||||
if args.port:
|
if args.port:
|
||||||
config.port=args.port
|
config.port=args.port
|
||||||
|
|
||||||
|
# Define the path to your custom CA bundle file
|
||||||
|
ca_bundle_path = lollms_paths.personal_certificates/"truststore.pem"
|
||||||
|
|
||||||
|
if ca_bundle_path.exists():
|
||||||
|
# Set the environment variable
|
||||||
|
os.environ['REQUESTS_CA_BUNDLE'] = str(ca_bundle_path)
|
||||||
|
|
||||||
cert_file_path = lollms_paths.personal_certificates/"cert.pem"
|
cert_file_path = lollms_paths.personal_certificates/"cert.pem"
|
||||||
key_file_path = lollms_paths.personal_certificates/"key.pem"
|
key_file_path = lollms_paths.personal_certificates/"key.pem"
|
||||||
if os.path.exists(cert_file_path) and os.path.exists(key_file_path):
|
if os.path.exists(cert_file_path) and os.path.exists(key_file_path):
|
||||||
|
Loading…
Reference in New Issue
Block a user