Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -155,7 +155,7 @@ def layoutjson2md(layout_data: Any) -> str:
|
|
155 |
|
156 |
|
157 |
# --- Core Application Logic ---
|
158 |
-
@spaces.GPU
|
159 |
def process_document_stream(model_name: str, task_choice: str, image: Image.Image, max_new_tokens: int):
|
160 |
"""
|
161 |
Main generator function that handles both OCR and Layout Analysis tasks.
|
@@ -231,7 +231,7 @@ def create_gradio_interface():
|
|
231 |
.process-button { border: none !important; color: white !important; font-weight: bold !important; background-color: blue !important;}
|
232 |
.process-button:hover { background-color: darkblue !important; transform: translateY(-2px) !important; box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important; }
|
233 |
"""
|
234 |
-
with gr.Blocks(theme=
|
235 |
gr.HTML("""
|
236 |
<div class="title" style="text-align: center">
|
237 |
<h1>OCR Comparator🥠</h1>
|
|
|
155 |
|
156 |
|
157 |
# --- Core Application Logic ---
|
158 |
+
@spaces.GPU
|
159 |
def process_document_stream(model_name: str, task_choice: str, image: Image.Image, max_new_tokens: int):
|
160 |
"""
|
161 |
Main generator function that handles both OCR and Layout Analysis tasks.
|
|
|
231 |
.process-button { border: none !important; color: white !important; font-weight: bold !important; background-color: blue !important;}
|
232 |
.process-button:hover { background-color: darkblue !important; transform: translateY(-2px) !important; box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important; }
|
233 |
"""
|
234 |
+
with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
235 |
gr.HTML("""
|
236 |
<div class="title" style="text-align: center">
|
237 |
<h1>OCR Comparator🥠</h1>
|