merterbak commited on
Commit
0aa4a7a
·
verified ·
1 Parent(s): 988d7f0

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +2 -2
  2. app.py +4 -2
  3. examples/ocr.jpg +2 -2
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: DeepSeek OCR Demo
3
  emoji: 🚀
4
  colorFrom: red
5
  colorTo: red
@@ -7,7 +7,7 @@ sdk: gradio
7
  sdk_version: 6.3.0
8
  app_file: app.py
9
  pinned: true
10
- short_description: Try out DeepSeek-OCR on your PDFs or images
11
  license: mit
12
  ---
13
 
 
1
  ---
2
+ title: DeepSeek OCR 2 Demo
3
  emoji: 🚀
4
  colorFrom: red
5
  colorTo: red
 
7
  sdk_version: 6.3.0
8
  app_file: app.py
9
  pinned: true
10
+ short_description: Try out DeepSeek-OCR-2 on your PDFs or images
11
  license: mit
12
  ---
13
 
app.py CHANGED
@@ -48,7 +48,7 @@ def draw_bounding_boxes(image, refs, extract_images=False):
48
  draw = ImageDraw.Draw(img_draw)
49
  overlay = Image.new('RGBA', img_draw.size, (0, 0, 0, 0))
50
  draw2 = ImageDraw.Draw(overlay)
51
- font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 30)
52
  crops = []
53
 
54
  color_map = {}
@@ -248,7 +248,9 @@ def update_page_selector(file_path):
248
  with gr.Blocks(title="DeepSeek-OCR-2") as demo:
249
  gr.Markdown("""
250
  # 🚀 DeepSeek-OCR-2 Demo
251
- **Convert documents to markdown, extract text, parse figures, and locate specific content with bounding boxes.**
 
 
252
 
253
  **If this tool was helpful, please consider giving it a like ❤️!**
254
  """)
 
48
  draw = ImageDraw.Draw(img_draw)
49
  overlay = Image.new('RGBA', img_draw.size, (0, 0, 0, 0))
50
  draw2 = ImageDraw.Draw(overlay)
51
+ font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 15)
52
  crops = []
53
 
54
  color_map = {}
 
248
  with gr.Blocks(title="DeepSeek-OCR-2") as demo:
249
  gr.Markdown("""
250
  # 🚀 DeepSeek-OCR-2 Demo
251
+ **Convert documents to markdown, extract text, parse figures, and locate specific content with bounding boxes.**
252
+
253
+ Powered by **DeepEncoder V2** - a novel LLM-style vision encoder that dynamically reorders visual tokens based on semantic understanding, mimicking human reading patterns instead of rigid left-to-right scanning. Achieves **91.09%** on OmniDocBench (+3.73% over v1).
254
 
255
  **If this tool was helpful, please consider giving it a like ❤️!**
256
  """)
examples/ocr.jpg CHANGED

Git LFS Details

  • SHA256: 7e3709e45cdcefb83606c40cfaf53a01f9be97174b7af604564cc696f25f4a77
  • Pointer size: 131 Bytes
  • Size of remote file: 774 kB

Git LFS Details

  • SHA256: 339d7b11d51ecaa10db3ab721b0d8bbeb03aed60109bc42760089013924fb7d6
  • Pointer size: 131 Bytes
  • Size of remote file: 281 kB