Spaces:
Running
Running
Download app.py from flozi00/traceforge: direct link, hf CLI and curl.
- Browser
- Download file 772 Bytes
-
https://huggingface.co/spaces/flozi00/traceforge/resolve/main/app.py
- Command line
-
hf download hf://spaces/flozi00/traceforge/app.py
-
curl -L -o app.py https://huggingface.co/spaces/flozi00/traceforge/resolve/main/app.py
772 Bytes
| """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) | |