Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
8dcd2f5
1
Parent(s):
4a840ae
update
Browse files- serve/constants.py +2 -2
- serve/log_server.py +2 -2
serve/constants.py
CHANGED
@@ -8,8 +8,8 @@ ROOT_PATH = os.getenv("ROOT_PATH", None)
|
|
8 |
ELO_RESULTS_DIR = os.getenv("ELO_RESULTS_DIR", "./arena_elo/results/latest")
|
9 |
|
10 |
LOG_SERVER = os.getenv("LOG_SERVER", "https://tigerai.ca")
|
11 |
-
|
12 |
-
LOG_SERVER_ADDR = os.getenv("LOG_SERVER_ADDR", f"{LOG_SERVER}{
|
13 |
# LOG SERVER API ENDPOINTS
|
14 |
APPEND_JSON = "append_json"
|
15 |
SAVE_IMAGE = "save_image"
|
|
|
8 |
ELO_RESULTS_DIR = os.getenv("ELO_RESULTS_DIR", "./arena_elo/results/latest")
|
9 |
|
10 |
LOG_SERVER = os.getenv("LOG_SERVER", "https://tigerai.ca")
|
11 |
+
LOG_SERVER_SUBDOMAIN = os.getenv("LOG_SERVER_SUBDOMAIN", "/GenAI-Arena-hf-logs")
|
12 |
+
LOG_SERVER_ADDR = os.getenv("LOG_SERVER_ADDR", f"{LOG_SERVER}{LOG_SERVER_SUBDOMAIN}")
|
13 |
# LOG SERVER API ENDPOINTS
|
14 |
APPEND_JSON = "append_json"
|
15 |
SAVE_IMAGE = "save_image"
|
serve/log_server.py
CHANGED
@@ -4,11 +4,11 @@ import json
|
|
4 |
import os
|
5 |
import aiofiles
|
6 |
from .log_utils import build_logger
|
7 |
-
from .constants import
|
8 |
|
9 |
logger = build_logger("log_server", "log_server.log", add_remote_handler=False)
|
10 |
|
11 |
-
app = APIRouter(prefix=
|
12 |
|
13 |
@app.post(f"/{APPEND_JSON}")
|
14 |
async def append_json(json_str: str = Form(...), file_name: str = Form(...)):
|
|
|
4 |
import os
|
5 |
import aiofiles
|
6 |
from .log_utils import build_logger
|
7 |
+
from .constants import LOG_SERVER_SUBDOMAIN, APPEND_JSON, SAVE_IMAGE, SAVE_LOG
|
8 |
|
9 |
logger = build_logger("log_server", "log_server.log", add_remote_handler=False)
|
10 |
|
11 |
+
app = APIRouter(prefix=LOG_SERVER_SUBDOMAIN)
|
12 |
|
13 |
@app.post(f"/{APPEND_JSON}")
|
14 |
async def append_json(json_str: str = Form(...), file_name: str = Form(...)):
|