Spaces:
Runtime error
Runtime error
Commit History
-
Add debug logging for received image data
Log type, length, and first 50 chars of the received base64 string to diagnose truncation or format issues. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>375fc07 -
Fix base64 data URI detection: use startsWith instead of comma check
The previous "," check could incorrectly split raw base64 strings. Added debug logging for base64 decode troubleshooting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>dcb3491 -
Change custom API path to /custom_api/ to avoid Gradio /api/ conflict
Gradio intercepts all /api/* routes when mounted at /. Use /custom_api/digitize_base64 instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ced277b -
Use FastAPI + mount_gradio_app for custom /api/digitize_base64 endpoint
Replace Gradio-only approach with FastAPI app that: - Registers /api/digitize_base64 as a direct POST endpoint - Enables CORS for cross-origin requests from StarryDigitizer - Mounts Gradio UI at / via gr.mount_gradio_app - Runs via uvicorn for proper FastAPI routing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f000791 -
Add base64 API endpoint for programmatic access
- digitize_chart now accepts both PIL Image and base64 strings - Add /api/digitize_base64 endpoint using gr.Textbox inputs so external clients can send base64 without Gradio file upload Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>cd3f7fd
-
Fix RoIAlign/RoIPool output_size to always be a tuple
The downstream code accesses output_size[0] and output_size[1], so normalize int inputs to (int, int) tuples. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d868632 -
Implement full CPU forward for MultiScaleDeformableAttention
Replace NotImplementedError stub with the actual pure-Python CPU implementation using F.grid_sample bilinear interpolation, matching the upstream mmcv multi_scale_deformable_attn_pytorch logic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>0b92003 -
Import MultiScaleDeformableAttention in ops __init__ for registry
The shim's __init__.py must import the multi_scale_deform_attn module so that @ATTENTION.register_module() is executed at import time, making it available in the attention registry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>4e247c3 -
Register MultiScaleDeformableAttention in mmcv ATTENTION registry
The stub class needs to be registered with @ATTENTION.register_module() so that BaseTransformerLayer can find it when building the model. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>dac41e5 -
Add sigmoid_focal_loss, deform_conv2d, get_onnxruntime_op_path to shim
These are imported by mmdet during module loading and must be available even if not used at inference time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>875a4a2 -
Add missing mmcv.ops stubs: RoIPool, DeformConv2d, etc.
The shim was missing RoIPool (needed by mmdet.apis.inference) and other ops imported at module load time. Add stubs for all ops referenced by mmdet to prevent ImportError at startup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>168a22c -
Fix apt package: libgl1-mesa-glx -> libgl1 for Debian Trixie
python:3.10-slim now uses Debian Trixie where libgl1-mesa-glx has been replaced by libgl1. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>c220d72
-
Fix PyTorch install URL: use --extra-index-url for CPU wheels
The -f torch_stable.html URL didn't have the correct CPU wheels. Switch to --extra-index-url https://download.pytorch.org/whl/cpu which is the official way to install PyTorch CPU-only. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>c6b46e4 -
Fix Dockerfile: extract mmcv.ops shim to separate Python file
Move inline Python code from Dockerfile RUN command into setup_mmcv_shim.py to fix Docker parse errors. Use mmcv lite instead of mmcv-full to avoid C++ compilation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>2d204ac -
Fix: inline MMCV_WITH_OPS=0 in RUN + --no-build-isolation
8419b53 -
Use mmcv-full with MMCV_WITH_OPS=0 (skip C++ extension build)
C++ ops (NMS, RoIAlign) are already patched to torchvision in chartdete_infer.py, so no native extensions needed.436b98c -
Switch to Docker SDK for reliable mmcv-full build
Gradio SDK pip install fails with mmcv-full. Docker gives full control over build order: torch first, then mmcv-full pre-built wheel, then remaining deps.fb7addb -
Fix requirements: use --extra-index-url for torch, remove gradio dup
ce63dd6 -
Fix build: pin torch 1.13 + mmcv-full pre-built wheel
- Pin torch==1.13.1+cpu and torchvision==0.14.1+cpu - Use --find-links for pre-built mmcv-full wheel (CPU, torch 1.13) - Pin numpy<2.0.0 for compatibility - Add packages.txt for system dependencies (libgl, glib)516c280
-
Initial deploy: AutoLineDigitizer Gradio API for HuggingFace Spaces
- Gradio API server for chart line extraction - Models auto-downloaded from GitHub Releases at startup - Supports StarryDigitizer JSON/ZIP and raw JSON output - Includes LineFormer and ChartDete inference modules27c91ef