import os from pathlib import Path SECRET_PREFIX = os.environ.get("SECRET_PREFIX", "") PROJECT_ID = os.environ.get("PROJECT_ID", "") ROLE_SUBJECT = os.environ.get("ROLE_SUBJECT", "") CREDENTIALS = os.environ.get("CREDENTIALS", "") os.environ[SECRET_PREFIX + "PROJECT_ID"] = PROJECT_ID os.environ[SECRET_PREFIX + "ROLE_SUBJECT"] = ROLE_SUBJECT os.environ[SECRET_PREFIX + "CREDENTIALS"] = CREDENTIALS BASE_HOST = os.environ.get("BASE_HOST", "") BASE_ENDPOINT = os.environ.get("BASE_ENDPOINT", "") CHATTY_HOST = os.environ.get("CHATTY_HOST", "") CHATTY_ENDPOINT = os.environ.get("CHATTY_ENDPOINT", "") ROOT_DIR = Path(__file__).parent.absolute() MODELS = { "llava-calm2-siglip-chatty": {"host": CHATTY_HOST, "endpoint": CHATTY_ENDPOINT}, "llava-calm2-siglip": {"host": BASE_HOST, "endpoint": BASE_ENDPOINT}, } HEADER = """ # LLaVA-CALM2-SigLIP LLaVA-CALM2-SigLIPは、calm2-7b-chatとsiglip-so400m-patch14-384からファインチューニングされたLLaVAモデルです。 ## Models - **llava-calm2-siglip**: 公開データを用いて学習されたVLM - **llava-calm2-siglip-chatty**: よりチャットに最適化するように学習したVLM """ FOOTER = """ ## Term of Use Please note that by using this service, you agree to the following terms: This model is provided for research purposes only. CyberAgent expressly disclaim any liability for direct, indirect, special, incidental, or consequential damages, as well as for any losses that may result from using this model, regardless of the outcomes. It is essential for users to fully understand these limitations before employing the model. ## License The service is a research preview intended for non-commercial use only. """ PLACEHOLDER = """

LLaVA-CALM2-SigLIP

LLaVA-CALM2-SigLIP is a LLaVA model fine-tuned from calm2-7b-chat and siglip-so400m-patch14-384

""" CSS = """ #chatbot { height: auto !important; max_height: none !important; overflow: auto !important; flex-grow: 1 !important; } """