Spaces:
Running
on
Zero
Running
on
Zero
constant.py
Browse files- serve/constants.py +63 -0
serve/constants.py
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
LOGDIR = os.getenv("LOGDIR", "./ksort-logs/vote_log")
|
4 |
+
IMAGE_DIR = os.getenv("IMAGE_DIR", f"{LOGDIR}/images")
|
5 |
+
KSORT_IMAGE_DIR = os.getenv("KSORT_IMAGE_DIR", f"{LOGDIR}/ksort_images")
|
6 |
+
VIDEO_DIR = os.getenv("VIDEO_DIR", f"{LOGDIR}/videos")
|
7 |
+
|
8 |
+
SERVER_PORT = os.getenv("SERVER_PORT", 7860)
|
9 |
+
ROOT_PATH = os.getenv("ROOT_PATH", None)
|
10 |
+
ELO_RESULTS_DIR = os.getenv("ELO_RESULTS_DIR", "./arena_elo/results/latest")
|
11 |
+
|
12 |
+
LOG_SERVER = os.getenv("LOG_SERVER", "http://127.0.0.1:22005")
|
13 |
+
LOG_SERVER_SUBDOMAIN = os.getenv("LOG_SERVER_SUBDOMAIN", "/ksort-logs")
|
14 |
+
LOG_SERVER_ADDR = os.getenv("LOG_SERVER_ADDR", f"{LOG_SERVER}{LOG_SERVER_SUBDOMAIN}")
|
15 |
+
# LOG SERVER API ENDPOINTS
|
16 |
+
APPEND_JSON = "append_json"
|
17 |
+
SAVE_IMAGE = "save_image"
|
18 |
+
SAVE_VIDEO = "save_video"
|
19 |
+
SAVE_LOG = "save_log"
|
20 |
+
|
21 |
+
SSH_MSCOCO = os.getenv("SSH_MSCOCO", "/root/MSCOCO_prompt")
|
22 |
+
|
23 |
+
|
24 |
+
SSH_SERVER = os.getenv("SSH_SERVER", "default_value")
|
25 |
+
SSH_PASSWORD = os.getenv("SSH_PASSWORD", "default_value")
|
26 |
+
SSH_PORT = os.getenv("SSH_PORT", "default_value")
|
27 |
+
SSH_USER = os.getenv("SSH_USER", "default_value")
|
28 |
+
SSH_LOG = os.getenv("SSH_LOG", "/home/zhendongucb/ksort/ksort_log/log")
|
29 |
+
SSH_VIDEO_LOG = os.getenv("SSH_LOG", "/home/zhendongucb/ksort/ksort_log/video_log")
|
30 |
+
SSH_SKILL = os.getenv("SSH_SKILL", "/home/zhendongucb/ksort/TrueSkill/trueskill_data.json")
|
31 |
+
SSH_VIDEO_SKILL = os.getenv("SSH_VIDEO_SKILL", "/home/zhendongucb/ksort/TrueSkill/trueskill_video_data.json")
|
32 |
+
|
33 |
+
SSH_CACHE_OPENSOURCE = os.getenv("SSH_CACHE_OPENSOURCE", "/home/zhendongucb/ksort/ksort_video_cache/Kaiyuan/")
|
34 |
+
SSH_CACHE_ADVANCE = os.getenv("SSH_CACHE_ADVANCE", "/home/zhendongucb/ksort/ksort_video_cache/Advance/")
|
35 |
+
SSH_CACHE_PIKA = os.getenv("SSH_CACHE_PIKA", "/home/zhendongucb/ksort/ksort_video_cache/Pika-Beta/")
|
36 |
+
SSH_CACHE_SORA = os.getenv("SSH_CACHE_SORA", "/home/zhendongucb/ksort/ksort_video_cache/Sora/")
|
37 |
+
|
38 |
+
SSH_CACHE_IMAGE = os.getenv("SSH_CACHE_IMAGE", "/home/zhendongucb/ksort/ksort_image_cache/")
|
39 |
+
|
40 |
+
# COLOR1=(128, 214, 255)
|
41 |
+
# COLOR2=(237, 247, 152)
|
42 |
+
# COLOR3=(250, 181, 122)
|
43 |
+
# COLOR4=(240, 104, 104)
|
44 |
+
|
45 |
+
# COLOR1=(112, 161, 215)
|
46 |
+
# COLOR2=(161, 222, 147)
|
47 |
+
# COLOR3=(247, 244, 139)
|
48 |
+
# COLOR4=(244, 124, 124)
|
49 |
+
|
50 |
+
COLOR1=(168, 230, 207)
|
51 |
+
COLOR2=(253, 255, 171)
|
52 |
+
COLOR3=(255, 211, 182)
|
53 |
+
COLOR4=(255, 170, 165)
|
54 |
+
|
55 |
+
# COLOR1=(255, 212, 96)
|
56 |
+
# COLOR2=(240, 123, 63)
|
57 |
+
# COLOR3=(234, 84, 85)
|
58 |
+
# COLOR4=(45, 64, 89)
|
59 |
+
|
60 |
+
# COLOR1=(255, 189, 57)
|
61 |
+
# COLOR2=(230, 28, 93)
|
62 |
+
# COLOR3=(147, 0, 119)
|
63 |
+
# COLOR4=(58, 0, 136)
|