merterbak commited on
Commit
e7e774d
Β·
verified Β·
1 Parent(s): a2dae08
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -233,7 +233,7 @@ def update_page_selector(file_path):
233
  label=f"Select Page (1-{page_count})")
234
  return gr.update(visible=False)
235
 
236
- with gr.Blocks(theme=gr.themes.Soft(), title="DeepSeek-OCR") as demo:
237
  gr.Markdown("""
238
  # πŸš€ DeepSeek-OCR Demo
239
  **Convert documents to markdown, extract raw text, and locate specific content with bounding boxes. It takes 20~ sec for markdown and 3~ sec for locate task examples. Check the info at the bottom of the page for more information.**
@@ -254,7 +254,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title="DeepSeek-OCR") as demo:
254
  with gr.Column(scale=2):
255
  with gr.Tabs() as tabs:
256
  with gr.Tab("Text", id="tab_text"):
257
- text_out = gr.Textbox(lines=20, show_copy_button=True, show_label=False)
258
  with gr.Tab("Markdown Preview", id="tab_markdown"):
259
  md_out = gr.Markdown("")
260
  with gr.Tab("Boxes", id="tab_boxes"):
@@ -262,7 +262,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title="DeepSeek-OCR") as demo:
262
  with gr.Tab("Cropped Images", id="tab_crops"):
263
  gallery = gr.Gallery(show_label=False, columns=3, height=400)
264
  with gr.Tab("Raw Text", id="tab_raw"):
265
- raw_out = gr.Textbox(lines=20, show_copy_button=True, show_label=False)
266
 
267
  gr.Examples(
268
  examples=[
@@ -308,4 +308,4 @@ with gr.Blocks(theme=gr.themes.Soft(), title="DeepSeek-OCR") as demo:
308
  submit_event.then(select_boxes, [task], [tabs])
309
 
310
  if __name__ == "__main__":
311
- demo.queue(max_size=20).launch()
 
233
  label=f"Select Page (1-{page_count})")
234
  return gr.update(visible=False)
235
 
236
+ with gr.Blocks(title="DeepSeek-OCR") as demo:
237
  gr.Markdown("""
238
  # πŸš€ DeepSeek-OCR Demo
239
  **Convert documents to markdown, extract raw text, and locate specific content with bounding boxes. It takes 20~ sec for markdown and 3~ sec for locate task examples. Check the info at the bottom of the page for more information.**
 
254
  with gr.Column(scale=2):
255
  with gr.Tabs() as tabs:
256
  with gr.Tab("Text", id="tab_text"):
257
+ text_out = gr.Textbox(lines=20, buttons=["copy"], show_label=False)
258
  with gr.Tab("Markdown Preview", id="tab_markdown"):
259
  md_out = gr.Markdown("")
260
  with gr.Tab("Boxes", id="tab_boxes"):
 
262
  with gr.Tab("Cropped Images", id="tab_crops"):
263
  gallery = gr.Gallery(show_label=False, columns=3, height=400)
264
  with gr.Tab("Raw Text", id="tab_raw"):
265
+ raw_out = gr.Textbox(lines=20, buttons=["copy"], show_label=False)
266
 
267
  gr.Examples(
268
  examples=[
 
308
  submit_event.then(select_boxes, [task], [tabs])
309
 
310
  if __name__ == "__main__":
311
+ demo.queue(max_size=20).launch(theme=gr.themes.Soft())