Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,10 +56,10 @@ def procesar_pdf(pdf_file=None, url_pdf=None, formatos=[], verbose="auto"):
|
|
| 56 |
try:
|
| 57 |
for fmt in formatos:
|
| 58 |
tiempo_parcial = f"{round(time.time() - start_time, 1)} s"
|
| 59 |
-
if fmt == "md
|
| 60 |
status = "Procesando: md ligero..."
|
| 61 |
cmd = ["marker_single", file_path, "--output_format", "markdown", "--skip_ocr", "--output_dir", output_dir]
|
| 62 |
-
elif fmt == "md
|
| 63 |
status = "Procesando: md completo (con OCR)..."
|
| 64 |
cmd = ["marker_single", file_path, "--output_format", "markdown", "--output_dir", output_dir]
|
| 65 |
else:
|
|
@@ -126,7 +126,7 @@ demo = gr.Interface(
|
|
| 126 |
gr.Textbox(label="O introduce una URL de PDF", placeholder="https://ejemplo.com/articulo.pdf"),
|
| 127 |
gr.CheckboxGroup(
|
| 128 |
choices=["md", "md + ocr", "html", "json"],
|
| 129 |
-
value=["md
|
| 130 |
label="Selecciona formatos de salida"
|
| 131 |
)
|
| 132 |
],
|
|
@@ -138,7 +138,7 @@ demo = gr.Interface(
|
|
| 138 |
gr.Textbox(label="Contenido extraído en Markdown", lines=25, visible=False)
|
| 139 |
],
|
| 140 |
title="Marker PDF",
|
| 141 |
-
description="Convierte artículos científicos en Markdown o
|
| 142 |
flagging_mode="never"
|
| 143 |
)
|
| 144 |
|
|
|
|
| 56 |
try:
|
| 57 |
for fmt in formatos:
|
| 58 |
tiempo_parcial = f"{round(time.time() - start_time, 1)} s"
|
| 59 |
+
if fmt == "md":
|
| 60 |
status = "Procesando: md ligero..."
|
| 61 |
cmd = ["marker_single", file_path, "--output_format", "markdown", "--skip_ocr", "--output_dir", output_dir]
|
| 62 |
+
elif fmt == "md + ocr":
|
| 63 |
status = "Procesando: md completo (con OCR)..."
|
| 64 |
cmd = ["marker_single", file_path, "--output_format", "markdown", "--output_dir", output_dir]
|
| 65 |
else:
|
|
|
|
| 126 |
gr.Textbox(label="O introduce una URL de PDF", placeholder="https://ejemplo.com/articulo.pdf"),
|
| 127 |
gr.CheckboxGroup(
|
| 128 |
choices=["md", "md + ocr", "html", "json"],
|
| 129 |
+
value=["md"],
|
| 130 |
label="Selecciona formatos de salida"
|
| 131 |
)
|
| 132 |
],
|
|
|
|
| 138 |
gr.Textbox(label="Contenido extraído en Markdown", lines=25, visible=False)
|
| 139 |
],
|
| 140 |
title="Marker PDF",
|
| 141 |
+
description="Convierte artículos científicos en Markdown (ligero o con OCR), HTML o JSON usando Marker. Descarga el resultado y un ZIP completo.",
|
| 142 |
flagging_mode="never"
|
| 143 |
)
|
| 144 |
|