Spaces:
Runtime error
Runtime error
Commit History
-
Upload main.py
Verified signature1. Backend Fixes (Critical) I identified a bug in the backend-pdf/main.py and unified-backend-trash/main.py files where the Excel conversion would crash if no tables were detected. The Bug: The code was attempting to initialize an ExcelWriter even when the table list (dfs) was empty. Since a workbook cannot be saved without at least one sheet, this triggered the At least one sheet must be visible 500 error. The Solution: I implemented a robust validation layer: Added a try-except block around the tabula.read_pdf extraction to catch low-level engine failures. Implemented a filter to remove empty dataframes. Strict Check: If no valid dataframes remain, the backend now returns a clean 400 Bad Request with a descriptive message: "No clear tables were detected inside the provided PDF. This tool requires documents with defined rows and columns." Wrapped the ExcelWriter block in its own try-except to prevent unhandled crashes during file generation. 2. Frontend UX Refinement I have synchroni…b45ff8d
-
Upload 3 files
Verified signatureI have resolved the 404 errors by significantly expanding the unified backend to support the full suite of PDF tools and correcting the frontend routing logic. The issue was that while we unified the backend, the previous version was missing several legacy endpoints (like /compress/pdf and /convert/*) and their corresponding system dependencies (Ghostscript, LibreOffice, etc.). 🛠️ Key Improvements Unified Backend Logic: Merged all processing logic from the legacy backend-pdf service into the new unified-backend/main.py. Restored endpoints for PDF Compression, Word/Excel/JPG Conversion, and EPUB processing. Integrated Rate Limiting and API Key Security to match the original production standards.5e184cd -
Upload requirements.txt
Verified signatureThe apt-get installation was successful, and it correctly identified and fetched all the required X11 and Chromium dependencies. I have just updated your requirements.txt with two critical fixes to ensure the rest of the build (the Python package installation stage) also succeeds without memory or CUDA conflicts: CPU-Only PyTorch: I added the --index-url https://download.pytorch.org/whl/cpu flag for both torch and torchvision. This is mandatory for Hugging Face CPU tiers; otherwise, the installer will attempt to fetch the 2GB+ CUDA version and fail. Rembg CPU Extra: I updated the rembg requirement to rembg[cpu] to explicitly use the CPU-optimized ONNX runtime.51fdac9 -
Upload Dockerfile
Verified signatureI have updated the Dockerfile to fix the build error. The issue was caused by the libgl1-mesa-glx package, which has been deprecated and removed in newer Debian-based images (like the one Hugging Face uses). I have replaced it with libgl1, which is the modern equivalent. I also took the liberty of adding libsm6 and libxext6, as these are frequently required by OpenCV (a dependency of EasyOCR) to handle image processing correctly in a headless Linux environment.8de5c6a -
Upload 3 files
Verified signature0794ff7 -
initial commit
Verified signature687c5a1