File size: 772 Bytes
0020de5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""Hugging Face Spaces entry point.

The Space runs this file. Everything it needs is in `traceforge/space/`;
configuration comes from Space secrets / variables:

    TRACEFORGE_BASE_URL      OpenAI-compatible endpoint (…/v1)
    TRACEFORGE_LLM_KEY       bearer token
    TRACEFORGE_MODEL         writer/judge model id
    TRACEFORGE_TRIAGE_MODEL  cheap labeler (default: TRACEFORGE_MODEL)
    TRACEFORGE_DATA_DIR      store root (default: ./data/space)

Locally: `python app.py` (or `traceforge space serve`).
"""
from __future__ import annotations

import os

from traceforge.space.app import CSS, build_app

demo = build_app()
demo.queue(default_concurrency_limit=4)

if __name__ == "__main__" or os.environ.get("SPACE_ID"):
    demo.launch(show_error=True, css=CSS)