Fix inference.py env var pattern to match submission checklist
Browse filesUse os.getenv("KEY", default) for API_BASE_URL and MODEL_NAME,
and os.getenv("HF_TOKEN") with no default, as required.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- inference.py +4 -3
inference.py
CHANGED
|
@@ -25,9 +25,10 @@ load_dotenv()
|
|
| 25 |
# Configuration
|
| 26 |
# ---------------------------------------------------------------------------
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
| 31 |
|
| 32 |
ENV_URL = os.getenv("ENV_URL", "http://localhost:7860")
|
| 33 |
BENCHMARK = "invoice_processing_pipeline"
|
|
|
|
| 25 |
# Configuration
|
| 26 |
# ---------------------------------------------------------------------------
|
| 27 |
|
| 28 |
+
API_BASE_URL = os.getenv("API_BASE_URL", "https://router.huggingface.co/v1")
|
| 29 |
+
MODEL_NAME = os.getenv("MODEL_NAME", "Qwen/Qwen2.5-72B-Instruct")
|
| 30 |
+
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 31 |
+
API_KEY = HF_TOKEN or os.getenv("API_KEY")
|
| 32 |
|
| 33 |
ENV_URL = os.getenv("ENV_URL", "http://localhost:7860")
|
| 34 |
BENCHMARK = "invoice_processing_pipeline"
|