Map image-only generation failures to the notice upload warning without relying on exception text hidden by the ZeroGPU wrapper.
Co-authored-by: Codex <codex@openai.com>
Handle invalid image generation as upload guidance
Abid Ali Awan+1: Codex
4149e50
Return the notice-image warning when an image-only request cannot produce a valid structured assessment, while preserving quota and text-model errors.
Co-authored-by: Codex <codex@openai.com>
Add local CUDA deployment and reject non-notice images
Abid Ali Awan+1: Codex
8ccb3e9
Add a Docker Compose Transformers runtime for local NVIDIA GPUs and use Nemotron semantic classes to reject picture-only uploads before MiniCPM generation.
Co-authored-by: Codex <codex@openai.com>
Add notice image guidance and update runtime docs
Abid Ali Awan+1: Codex
edecb11
Show a clear warning when an uploaded image has no readable notice text, and document the English-only ZeroGPU Transformers deployment.
Co-authored-by: Codex <codex@openai.com>
Simplify status badge text
Abid Ali Awan+1: Codex
fb8ab7d
Co-authored-by: Codex <codex@openai.com>
Remove logging from app modules
Abid Ali Awan+1: Codex
ed9b3cc
Co-authored-by: Codex <codex@openai.com>
Add fallback values for empty red_flags and safe_next_steps
Abid Ali Awan+1: Codex
23aaddf
When MiniCPM5-1B returns empty arrays, provide sensible defaults
instead of rejecting the entire response.
Co-authored-by: Codex <codex@openai.com>
Preload Nemotron-Parse model at startup
Abid Ali Awan+1: Codex
e289ef1
Download and load the OCR model during app startup instead of
on the first request. This avoids the long delay when a user
first clicks 'Check this notice'.
Co-authored-by: Codex <codex@openai.com>
Log detailed error when Nemotron-Parse fails to load
Abid Ali Awan+1: Codex
b5fbf31
Co-authored-by: Codex <codex@openai.com>
Replace Nemotron OCR v2 with Nemotron-Parse-v1.2
Abid Ali Awan+1: Codex
a03a0fe
Switch OCR backend from the nemotron-ocr wheel (binary, pinned
PyTorch/CUDA) to nvidia/NVIDIA-Nemotron-Parse-v1.2 via transformers.
This removes the custom torch/torchvision pins and the CUDA index URL.
- Rewrite ocr.py to use AutoModel + AutoProcessor + postprocessing
- Remove nemotron-ocr wheel, torch, torchvision from requirements
- Add timm and albumentations dependencies
- Remove Urdu-script OCR restriction
- Update model status labels and error messages
Co-authored-by: Codex <codex@openai.com>
Catch ZeroGPU quota errors and reduce GPU duration to 45s
Abid Ali Awan+1: Codex
429a368
Distinguish ZeroGPU quota exhaustion from model parsing failures
so users see a clear 'GPU quota exceeded' message instead of the
misleading 'incomplete response' error. Reduce @spaces.GPU
duration from 60s to 45s to conserve quota.
Co-authored-by: Codex <codex@openai.com>
Add logging for model response diagnostics on Spaces
Abid Ali Awan+1: Codex
c6454a8
Add structured logging to model_endpoint.py and service.py so
model failures are visible in Space runtime logs. Logs include
raw model output, JSON parse errors, normalization failures,
and retry attempt details.
Co-authored-by: Codex <codex@openai.com>
Retry malformed MiniCPM JSON with a strict repair turn, expose ZeroGPU CUDA status, and return a clear unsupported-language message for Urdu-script screenshots.
Co-Authored-By: Codex <codex@openai.com>
Use the bundled public screenshot to identify the deployed Nemotron OCR failure stage without exposing user data.
Co-Authored-By: Codex <codex@openai.com>
Describe the assessment keys directly instead of embedding JSON Schema that the 1B model copied into its response.
Co-Authored-By: Codex <codex@openai.com>
Load MiniCPM with automatic dtype and device mapping and prepare chat inputs exactly as documented by the model card.
Co-Authored-By: Codex <codex@openai.com>
Do not download the local llama.cpp model when the Space starts. ZeroGPU requests use Transformers MiniCPM and Nemotron OCR; GGUF downloads remain explicit local-only commands.
Co-Authored-By: Codex <codex@openai.com>
Run MiniCPM5-1B through Transformers on ZeroGPU while keeping llama.cpp and the GGUF model in a dedicated local dependency path.
Co-Authored-By: Codex <codex@openai.com>
Load Torch CUDA dependencies before llama-cpp-python and retain a bounded failure diagnostic for deployment verification.
Co-Authored-By: Codex <codex@openai.com>
Temporarily expose a bounded model response excerpt for deployment diagnosis.
Co-Authored-By: Codex <codex@openai.com>
Finalize ZeroGPU runtime handling
Kingabzpro+1: Codex
d99006b
Remove temporary diagnostics and reduce the GPU reservation for quota-friendly requests.
Co-authored-by: Codex <codex@openai.com>
Capture wrapped ZeroGPU diagnostic
Abid Ali Awan+1: OpenAI Codex
d381615
Co-authored-by: OpenAI Codex <codex@openai.com>
Expose temporary ZeroGPU diagnostic
Abid Ali Awan+1: OpenAI Codex
c7d45fc
Co-authored-by: OpenAI Codex <codex@openai.com>
Add temporary model runtime diagnostic
Abid Ali Awan+1: OpenAI Codex
77f430e
Co-authored-by: OpenAI Codex <codex@openai.com>
Fix NoticeCheck runtime and final styling
Abid Ali Awan+1: OpenAI Codex
67a2445
Preload the CUDA runtime for Nemotron OCR, increase MiniCPM output capacity, show both local models, and remove inherited green accents.
Co-authored-by: OpenAI Codex <codex@openai.com>
Constrain MiniCPM output to assessment JSON
Abid Ali Awan+1: OpenAI Codex
551145e
Disable thinking by default for production schema reliability and apply llama.cpp JSON constraints to all generation modes.
Co-authored-by: OpenAI Codex <codex@openai.com>
Refactor and rebrand app as NoticeCheck
Abid Ali Awan+1: OpenAI Codex
6cf9641
Run MiniCPM5-1B through llama-cpp-python and use Nemotron OCR v2 for screenshot extraction on ZeroGPU.
Co-authored-by: OpenAI Codex <codex@openai.com>