ZhangYuhan commited on
Commit
03df4c2
1 Parent(s): 6bc5e6c

Create constrants.py

Browse files
Files changed (1) hide show
  1. constrants.py +28 -0
constrants.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from pathlib import Path
3
+
4
+ os.chdir(Path.cwd())
5
+
6
+ LOGDIR = os.getenv("LOGDIR", "./3DGen-Arena-logs/vote_log")
7
+ IMAGE_DIR = os.getenv("IMAGE_DIR", f"{LOGDIR}/images")
8
+ OFFLINE_DIR = "./offline"
9
+ OFFLINE_GIF_DIR = os.path.join(OFFLINE_DIR, "gifs")
10
+
11
+ SERVER_PORT = os.getenv("SERVER_PORT", 7860)
12
+ ROOT_PATH = os.getenv("ROOT_PATH", None)
13
+ ELO_RESULTS_DIR = os.getenv("ELO_RESULTS_DIR", "./arena_elo/results/latest")
14
+
15
+ LOG_SERVER = os.getenv("LOG_SERVER", "https://tigerai.ca")
16
+ LOG_SERVER_SUBDOAMIN = os.getenv("LOG_SERVER_SUBDIR", "GenAI-Arena-hf-logs")
17
+ LOG_SERVER_ADDR = os.getenv("LOG_SERVER_ADDR", f"{LOG_SERVER}/{LOG_SERVER_SUBDOAMIN}")
18
+ # LOG SERVER API ENDPOINTS
19
+ APPEND_JSON = "append_json"
20
+ SAVE_IMAGE = "save_image"
21
+ SAVE_LOG = "save_log"
22
+
23
+ NUM_SIDES = 2
24
+ TEXT_PROMPT_PATH = "offline/prompts_110.json"
25
+ IMAGE_PROMPT_PATH = "offline/image_urls.txt"
26
+
27
+ MAX_ATTEMPTS = 5
28
+ REPLICATE_API_TOKEN = os.getenv("REPLICATE_API_TOKEN", "r8_0BaoQW0G8nWFXY8YWBCCUDurANxCtY72rarv9")