Spaces:
Running
Running
Synced repo using 'sync_with_huggingface' Github Action
Browse filesoriginal:
- remote: "https://github.com/xiaoyao9184/docker-marker"
- commit: "cb534cf42bf10687d9b426ea903c589c6ebeccca"
sync_with_huggingface:
- repository: ""
- ref: ""
- gradio_app.py +9 -2
gradio_app.py
CHANGED
@@ -10,13 +10,14 @@ if "APP_PATH" in os.environ:
|
|
10 |
sys.path.append(app_path)
|
11 |
|
12 |
import gradio as gr
|
|
|
|
|
13 |
|
14 |
from marker.settings import settings
|
15 |
|
16 |
import base64
|
17 |
import io
|
18 |
import re
|
19 |
-
from typing import Any, Dict
|
20 |
import json
|
21 |
|
22 |
import pypdfium2
|
@@ -105,7 +106,9 @@ with gr.Blocks(title="Marker") as demo:
|
|
105 |

|
106 |
This app will let you try marker, a PDF -> Markdown converter. It works with any languages, and extracts images, tables, equations, etc.
|
107 |
|
108 |
-
Find the project [here](https://github.com/VikParuchuri/marker).
|
|
|
|
|
109 |
""")
|
110 |
|
111 |
with gr.Row():
|
@@ -224,6 +227,10 @@ with gr.Blocks(title="Marker") as demo:
|
|
224 |
- layout_image (dict or None): Visualized layout image (if debug is True, else None).
|
225 |
- preview_image (dict or None): Preview image.
|
226 |
"""
|
|
|
|
|
|
|
|
|
227 |
cli_options = {
|
228 |
"output_format": output_format,
|
229 |
"page_range": page_range,
|
|
|
10 |
sys.path.append(app_path)
|
11 |
|
12 |
import gradio as gr
|
13 |
+
import requests
|
14 |
+
from contextlib import suppress
|
15 |
|
16 |
from marker.settings import settings
|
17 |
|
18 |
import base64
|
19 |
import io
|
20 |
import re
|
|
|
21 |
import json
|
22 |
|
23 |
import pypdfium2
|
|
|
106 |

|
107 |
This app will let you try marker, a PDF -> Markdown converter. It works with any languages, and extracts images, tables, equations, etc.
|
108 |
|
109 |
+
Find the original project [here](https://github.com/VikParuchuri/marker).
|
110 |
+
Or this project [here](https://github.com/xiaoyao9184/docker-marker).
|
111 |
+
See the [README](./blob/main/README.md) for Spaces's metadata.
|
112 |
""")
|
113 |
|
114 |
with gr.Row():
|
|
|
227 |
- layout_image (dict or None): Visualized layout image (if debug is True, else None).
|
228 |
- preview_image (dict or None): Preview image.
|
229 |
"""
|
230 |
+
# update counter
|
231 |
+
with suppress(Exception):
|
232 |
+
requests.get("https://counterapi.com/api/xiaoyao9184.github.com/view/docker-marker")
|
233 |
+
|
234 |
cli_options = {
|
235 |
"output_format": output_format,
|
236 |
"page_range": page_range,
|