Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -348,7 +348,7 @@ def turn_page(direction: str) -> Tuple[Optional[Image.Image], str, Any, Optional
|
|
348 |
if pdf_cache["is_parsed"] and index < len(pdf_cache["results"]):
|
349 |
result = pdf_cache["results"][index]
|
350 |
if isinstance(result, dict): # dots.ocr
|
351 |
-
markdown_content = result.get('markdown_content',
|
352 |
processed_img = result.get('processed_image', None)
|
353 |
layout_json = result.get('layout_result', None)
|
354 |
else: # Dolphin
|
@@ -366,8 +366,15 @@ def create_gradio_interface():
|
|
366 |
css = """
|
367 |
.main-container { max-width: 1400px; margin: 0 auto; }
|
368 |
.header-text { text-align: center; color: #2c3e50; margin-bottom: 20px; }
|
369 |
-
.process-button {
|
370 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
.info-box { border: 1px solid #dee2e6; border-radius: 8px; padding: 15px; margin: 10px 0; }
|
372 |
.page-info { text-align: center; padding: 8px 16px; border-radius: 20px; font-weight: bold; margin: 10px 0; }
|
373 |
.model-status { padding: 10px; border-radius: 8px; margin: 10px 0; text-align: center; font-weight: bold; }
|
|
|
348 |
if pdf_cache["is_parsed"] and index < len(pdf_cache["results"]):
|
349 |
result = pdf_cache["results"][index]
|
350 |
if isinstance(result, dict): # dots.ocr
|
351 |
+
markdown_content = result.get('markdown_content', 'No content available')
|
352 |
processed_img = result.get('processed_image', None)
|
353 |
layout_json = result.get('layout_result', None)
|
354 |
else: # Dolphin
|
|
|
366 |
css = """
|
367 |
.main-container { max-width: 1400px; margin: 0 auto; }
|
368 |
.header-text { text-align: center; color: #2c3e50; margin-bottom: 20px; }
|
369 |
+
.process-button {
|
370 |
+
border: none !important;
|
371 |
+
color: white !important;
|
372 |
+
font-weight: bold !important;
|
373 |
+
background-color: blue !important;}
|
374 |
+
.process-button:hover {
|
375 |
+
background-color: darkblue !important;
|
376 |
+
transform: translateY(-2px) !important;
|
377 |
+
box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important; }
|
378 |
.info-box { border: 1px solid #dee2e6; border-radius: 8px; padding: 15px; margin: 10px 0; }
|
379 |
.page-info { text-align: center; padding: 8px 16px; border-radius: 20px; font-weight: bold; margin: 10px 0; }
|
380 |
.model-status { padding: 10px; border-radius: 8px; margin: 10px 0; text-align: center; font-weight: bold; }
|