Spaces:
Configuration error
Configuration error
Commit History
-
Add LaTeX lint/correction item to backlog
f3954b3 -
Use workspace base image as first-load extract fallback
9a36dca -
Shorten output tab names for workflow clarity
49c6e10 -
Add tab for cleaned text with original LaTeX delimiters
87fd46f -
Populate full-page cropped gallery from detected refs
3edf7ce -
Dedupe repeated equation blocks in region OCR output
7e8815a -
Handle more example payload shapes in workspace loader
2c2efb5 -
Strip malformed grounding tags from markdown output
2987995 -
Tune tall-page auto zoom to ~88% and add pen/zoom note
2fa4f01 -
Auto-zoom tall workspace images toward width
e3d3adf -
Keep workspace images full-res and fix example loader quality
46b7b46 -
Fix example workspace zoom initialization
8d5696e -
Simplify zoom workflow and prefer ImageEditor hand/pan path
be5abde -
Set workspace scale default to 89 percent
37739bf -
Set Spaces SDK back to latest gradio 6.8.0
1c94cf6 -
Add workspace scale control to avoid in-canvas zoom draw lag
054ea21 -
Make Gradio launch arguments version-compatible for 5.x/6.x
75469a7 -
Make textbox components compatible with gradio 5.49.1
29ae2cb -
Test gradio 5.49.1 SDK version for live drawing behavior
ca1ef77
-
Try gradio 6.7.0 rollback and transparent brush fallback
f205ece -
Prefer Paint workspace for live drawing with ImageEditor fallback
a09a317 -
Remove long ImageEditor label that obscured top of workspace
e8612b6 -
Use simpler live-visible brush config for region drawing
f2b35ef -
Show cropped regions with preserved aspect ratio and dimensions
d662a7b -
Improve live region painting visibility in ImageEditor
33481c3 -
Preserve workspace zoom by delta-based region snapshots
7763137 -
Keep region selections separate and clear overlays after add
d3dfd44 -
Refactor UI into workflow-first layout with larger workspace
fce2f1f -
Refactor examples into thumbnail-first standard layout
bc8cf96 -
Add equation-line separate OCR mode and freehand-first guidance
0ef2109 -
Label selected regions across boxes and cropped outputs
930195f -
Unify image workspace selection and add translucent freehand overlay
3affffd -
Simplify region workflow: visible selector and single Extract path
7b8199f -
Improve faculty-facing region selection guidance in UI
152c5bd -
Make equation multipass optional and integrate region OCR across all outputs
c0f56fe -
Add AGENTS operational notes for Spaces secrets and GPU abort debugging
0da0e18 -
Add gitignore and Spaces-compatible HF secret/log workflow
9720c18 -
Add region OCR UI and clarify Free OCR vs Locate behavior
d6afca6 -
Refine equation grounding with zoom-in pass and per-box spatial blocks
f76cb58
-
Update markdown preview test loader for spatial helpers
474fd39 -
Add spatial HTML preview mode using grounding boxes
4d410ae -
Add HTML+MathJax preview panel with source view
5c1486c -
Preserve OCR line breaks in markdown preview
07a370e -
Fix markdown preview math replacement inside code blocks
093c1dd -
Fix MathML rendering: placeholder approach + HTML escaping + \frac OCR fix
Three bugs fixed: - Python-Markdown stopped capturing multi-line <div> blocks at blank lines. Switch to placeholder approach: extract math → replace with ZZKEY tokens → run markdown → swap keys back for MathML/HTML. - Unescaped '&' in LaTeX fallback blocks broke HTML (e.g. \begin{aligned}&...). Use html.escape() in the <code> fallback in _to_mathml. - OCR error \frac{1/2} (single-argument fraction) caused latex2mathml to fail. Pre-process with re.sub to split into proper \frac{1}{2} form. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>9d4d37e -
Replace browser-side KaTeX/MathJax with server-side MathML via latex2mathml
Every browser-side approach failed in Gradio's rendering pipeline: - MathJax: JS typeset callback couldn't reach elements in shadow DOM - gr.Markdown + KaTeX: markdown engine processed \\ (LaTeX line-break) as <br> before KaTeX saw the content, breaking aligned environments New approach: convert LaTeX to MathML in Python before the output ever reaches the browser. MathML is a W3C standard rendered natively by all modern browsers — no JavaScript, no CDN, no timing callbacks. - Add _to_mathml(): converts LaTeX via latex2mathml, graceful fallback to <code> block for unsupported commands - Replace to_math_md() with to_math_html(): MathML blocks are embedded as <div class="math-display"> before the markdown pass, so Python- Markdown treats them as raw HTML blocks and leaves them untouched - Orphaned \[ (truncated model output) stripped before markdown pass - Restore gr.HTML + PREVIEW_CSS for styled output; remove gr.Markdown latex_delimiters approach entirely - requirements.txt:…dc85ea9 -
Fix aligned environments breaking KaTeX: collapse math to single line
Two root causes for equations not rendering after the first few: 1. LaTeX \\ (line-break inside \begin{aligned}) was being processed by Gradio's markdown engine as a hard line-break (<br>) before KaTeX saw the content. Multi-line $$ ... $$ blocks may also not be recognised by the underlying marked.js parser. Fix: collapse all whitespace (including real newlines) inside \[...\] content to a single space before wrapping in $$content$$. \\ is two backslash characters, not whitespace, so it is preserved and KaTeX receives valid aligned-environment LaTeX. 2. Truncated model output (page content cut off mid-equation) left an unclosed \[ in the text with no matching \], which appeared as raw LaTeX. Fix: after converting all complete \[...\] pairs, strip any remaining orphaned \[ to end-of-string. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6b7d576 -
Replace MathJax+gr.HTML with gr.Markdown+KaTeX for reliable math rendering
MathJax + gr.HTML was unreliable: the typeset JS callback couldn't find .math-preview due to Gradio's shadow DOM isolation, and the head= script injection had no guaranteed timing. Switch to gr.Markdown with built-in KaTeX via latex_delimiters — math rendering is handled natively by Gradio with no external scripts or JS callbacks needed. - Remove MATHJAX_HEAD, md_lib import, pymdownx.arithmatex dependency - Replace to_math_html() with to_math_md(): just converts \[...\] → $$...$$ and \(...\) → $...$ for gr.Markdown's KaTeX renderer - Replace gr.HTML with gr.Markdown(latex_delimiters=[...]) - Remove submit_event MathJax typeset JS handler - Remove head=MATHJAX_HEAD from launch() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a53cc22 -
Fix LaTeX display and add quality-of-life improvements
- Fix display math mis-parsing: convert \[...\] to block $$\ncontent\n$$ form so arithmatex correctly identifies display math instead of treating it as inline math surrounded by literal $ signs - Fix MathJax typeset in Gradio shadow DOM: walk shadow roots to find .math-preview instead of relying on document.querySelector which fails inside Gradio's shadow DOM isolation; add 2s fallback for GPU cold-starts - Add MathJax mathtools extension so \coloneqq / \eqqcolon render natively without requiring text substitutions - Text tab: convert \[...\] → $$...$$ and \(...\) → $...$ for readability - Add Download Markdown button that appears after each extraction Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b1169dd -
Fix Space metadata: suggested_hardware not hardware
hardware: zero-gpu is not a documented frontmatter field and has no effect. The correct field is suggested_hardware: zero-a10g, which hints to people duplicating the Space what hardware to request. Actual ZeroGPU hardware is assigned via Space Settings UI (requires PRO subscription) — frontmatter cannot assign hardware. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>5862a49