creativity / constants.py
liujch1998's picture
Add disclaimers
c24faa7
raw
history blame
970 Bytes
import os
# options
INDEX_BY_DESC = {
'Dolma-v1.7 (2.6T tokens)': 'v4_dolma-v1_7_llama',
'RedPajama (1.4T tokens)': 'v4_rpj_llama_s4',
'Pile-train (380B tokens)': 'v4_piletrain_llama',
'C4-train (200B tokens)': 'v4_c4train_llama',
'Pile-val (390M tokens)': 'v4_pileval_llama',
}
INDEX_DESCS = list(INDEX_BY_DESC.keys())
# API limits and defaults
MAX_QUERY_CHARS = int(os.environ.get('MAX_QUERY_CHARS', 1000))
NGRAM_LEN_MIN = int(os.environ.get('NGRAM_LEN_MIN', 5))
NGRAM_LEN_MAX = int(os.environ.get('NGRAM_LEN_MAX', 11))
MAX_DISP_CHARS_PER_LINE = int(os.environ.get('MAX_DISP_CHARS_PER_LINE', 90))
MAX_TIMEOUT_IN_SECONDS = int(os.environ.get('MAX_TIMEOUT_IN_SECONDS', 30))
# HF demo
API_URL = os.environ.get('API_URL', None)
DEFAULT_CONCURRENCY_LIMIT = os.environ.get('DEFAULT_CONCURRENCY_LIMIT', 10)
MAX_SIZE = os.environ.get('MAX_SIZE', 100)
MAX_THREADS = os.environ.get('MAX_THREADS', 40)
DEBUG = (os.environ.get('DEBUG', 'False') != 'False')