Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -136,7 +136,7 @@ def _format_result(result):
|
|
| 136 |
# Inference
|
| 137 |
# ---------------------------------------------------------------------------
|
| 138 |
|
| 139 |
-
@spaces.GPU(duration=
|
| 140 |
def parse_document(
|
| 141 |
image,
|
| 142 |
query: str = DEFAULT_QUERY,
|
|
@@ -201,7 +201,7 @@ CSS = """
|
|
| 201 |
.dark .gradio-container { color: var(--body-text-color); }
|
| 202 |
"""
|
| 203 |
|
| 204 |
-
with gr.Blocks(
|
| 205 |
gr.Markdown(
|
| 206 |
"# PaDoc: Layout-Grounded Parallel Decoding for Document Parsing\n"
|
| 207 |
"Upload a document image to extract its layout structure and region content "
|
|
@@ -255,4 +255,4 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
|
| 255 |
cache_mode="lazy",
|
| 256 |
)
|
| 257 |
|
| 258 |
-
demo.launch(mcp_server=True)
|
|
|
|
| 136 |
# Inference
|
| 137 |
# ---------------------------------------------------------------------------
|
| 138 |
|
| 139 |
+
@spaces.GPU(duration=60)
|
| 140 |
def parse_document(
|
| 141 |
image,
|
| 142 |
query: str = DEFAULT_QUERY,
|
|
|
|
| 201 |
.dark .gradio-container { color: var(--body-text-color); }
|
| 202 |
"""
|
| 203 |
|
| 204 |
+
with gr.Blocks() as demo:
|
| 205 |
gr.Markdown(
|
| 206 |
"# PaDoc: Layout-Grounded Parallel Decoding for Document Parsing\n"
|
| 207 |
"Upload a document image to extract its layout structure and region content "
|
|
|
|
| 255 |
cache_mode="lazy",
|
| 256 |
)
|
| 257 |
|
| 258 |
+
demo.launch(mcp_server=True, theme=gr.themes.Citrus(), css=CSS)
|