Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse filesFiles changed (2)
- README.md+17-5
- inference.py+4-4
344 unmodified lines345346347348349350351352353354355356357358359360361362363364365366344 unmodified lines| `TRACE_BOX_WIDTH` | `76` | Width of the boxed trace output || `SPINNER_ENABLED` | `0` | CLI spinner while waiting for LLM response |### Inference test — deployed Qwen (HF dedicated Inference Endpoint)> ### 🧪 Deployed endpoint smoke test>> Team-hosted OpenAI-compatible endpoint for **`inference.py`** / **`client.py`** smoke runs (MissionCtrl server on `ENV_BASE_URL` as usual).>> | Setting | Value |> |---|---|> | **`API_BASE_URL`** | `https://xfb9waxafjtm3p05.us-east4.gcp.endpoints.huggingface.cloud` |> | **`MODEL_NAME`** | `quen` |>> `inference.py` normalizes dedicated HF URLs to end with **`/v1`** for the OpenAI client when the host matches `*.endpoints.huggingface.cloud`.>> ```bash> export API_BASE_URL="https://xfb9waxafjtm3p05.us-east4.gcp.endpoints.huggingface.cloud"> export MODEL_NAME="quen"> export HF_TOKEN="hf_..." # token must be allowed to infer on this endpoint (scope / org role)> export ENV_BASE_URL="http://localhost:7860"> python inference.py344 unmodified lines345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378344 unmodified lines| `TRACE_BOX_WIDTH` | `76` | Width of the boxed trace output || `SPINNER_ENABLED` | `0` | CLI spinner while waiting for LLM response |### Inference test — deployed trained model (HF dedicated Inference Endpoint)> ### 🧪 Deployed endpoint smoke test>> Team-hosted OpenAI-compatible endpoint for **`inference.py`** / **`client.py`** smoke runs (MissionCtrl server on `ENV_BASE_URL` as usual).>> ### 🧭 Inference priority order (`inference.py`)>> ```text> 1) Primary> API_BASE_URL = https://pfxsogmap6do11nx.us-east4.gcp.endpoints.huggingface.cloud> MODEL_NAME = missionctrl-env-wnc>> 2) Fallback (hosted model)> API_BASE_URL = https://xfb9waxafjtm3p05.us-east4.gcp.endpoints.huggingface.cloud> MODEL_NAME = quen> ```>> | Setting | Value |> |---|---|> | **`API_BASE_URL`** | `https://pfxsogmap6do11nx.us-east4.gcp.endpoints.huggingface.cloud` |> | **`MODEL_NAME`** | `missionctrl-env-wnc` |>> `inference.py` normalizes dedicated HF URLs to end with **`/v1`** for the OpenAI client when the host matches `*.endpoints.huggingface.cloud`.>> ```bash> export API_BASE_URL="https://pfxsogmap6do11nx.us-east4.gcp.endpoints.huggingface.cloud"> export MODEL_NAME="missionctrl-env-wnc"> export HF_TOKEN="hf_..." # token must be allowed to infer on this endpoint (scope / org role)> export ENV_BASE_URL="http://localhost:7860"> python inference.py
72 unmodified lines73747576777879808182838485868772 unmodified lines# Non-empty values override `.env`, shell env, and CLI flags (see apply order below).# Leave as "" to use env / CLI only (e.g. empty HF_TOKEN in repo; Space injects at runtime).# =============================================================================_INFERENCE_API_BASE_URL: str = "https://xfb9waxafjtm3p05.us-east4.gcp.endpoints.huggingface.cloud"_INFERENCE_MODEL_NAME: str = "qwen"_INFERENCE_HF_TOKEN: str = ""_INFERENCE_ENV_BASE_URL: str = ""# Optional failover chain (used when the active provider errors during inference).# Keep tokens empty in-repo; runtime secrets can still arrive from env / Spaces._INFERENCE_FALLBACK_API_BASE_URL: str = "https://router.huggingface.co/v1"_INFERENCE_FALLBACK_MODEL_NAME: str = "meta-llama/Llama-3.1-8B-Instruct"_INFERENCE_FALLBACK_HF_TOKEN: str = ""_INFERENCE_FALLBACK2_API_BASE_URL: str = "https://api.groq.com/openai/v1"72 unmodified lines73747576777879808182838485868772 unmodified lines# Non-empty values override `.env`, shell env, and CLI flags (see apply order below).# Leave as "" to use env / CLI only (e.g. empty HF_TOKEN in repo; Space injects at runtime).# =============================================================================_INFERENCE_API_BASE_URL: str = "https://pfxsogmap6do11nx.us-east4.gcp.endpoints.huggingface.cloud"_INFERENCE_MODEL_NAME: str = "missionctrl-env-wnc"_INFERENCE_HF_TOKEN: str = ""_INFERENCE_ENV_BASE_URL: str = ""# Optional failover chain (used when the active provider errors during inference).# Keep tokens empty in-repo; runtime secrets can still arrive from env / Spaces._INFERENCE_FALLBACK_API_BASE_URL: str = "https://xfb9waxafjtm3p05.us-east4.gcp.endpoints.huggingface.cloud"_INFERENCE_FALLBACK_MODEL_NAME: str = "quen"_INFERENCE_FALLBACK_HF_TOKEN: str = ""_INFERENCE_FALLBACK2_API_BASE_URL: str = "https://api.groq.com/openai/v1"
README.md+17-5
inference.py+4-4