Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,15 +25,15 @@ from transformers import (
|
|
| 25 |
)
|
| 26 |
|
| 27 |
# --- Activate Forced Dark Mode ---
|
| 28 |
-
js_func = """
|
| 29 |
-
function refresh() {
|
| 30 |
-
const url = new URL(window.location);
|
| 31 |
-
if (url.searchParams.get('__theme') !== 'dark') {
|
| 32 |
-
url.searchParams.set('__theme', 'dark');
|
| 33 |
-
window.location.href = url.href;
|
| 34 |
-
}
|
| 35 |
-
}
|
| 36 |
-
"""
|
| 37 |
|
| 38 |
# --- Constants and Model Setup ---
|
| 39 |
MAX_INPUT_TOKEN_LENGTH = 4096
|
|
@@ -202,10 +202,11 @@ def create_gradio_interface():
|
|
| 202 |
.process-button { border: none !important; color: white !important; font-weight: bold !important; background-color: blue !important;}
|
| 203 |
.process-button:hover { background-color: darkblue !important; transform: translateY(-2px) !important; box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important; }
|
| 204 |
"""
|
| 205 |
-
with gr.Blocks(theme="bethecloud/storj_theme", css=css, js=js_func) as demo:
|
|
|
|
| 206 |
gr.HTML("""
|
| 207 |
<div class="title" style="text-align: center">
|
| 208 |
-
<h1>OCR Comparator
|
| 209 |
<p style="font-size: 1.1em; color: #6b7280; margin-bottom: 0.6em;">
|
| 210 |
Advanced Vision-Language Model for Image Content and Layout Extraction
|
| 211 |
</p>
|
|
|
|
| 25 |
)
|
| 26 |
|
| 27 |
# --- Activate Forced Dark Mode ---
|
| 28 |
+
#js_func = """
|
| 29 |
+
#function refresh() {
|
| 30 |
+
# const url = new URL(window.location);
|
| 31 |
+
# if (url.searchParams.get('__theme') !== 'dark') {
|
| 32 |
+
# url.searchParams.set('__theme', 'dark');
|
| 33 |
+
# window.location.href = url.href;
|
| 34 |
+
# }
|
| 35 |
+
#}
|
| 36 |
+
#"""
|
| 37 |
|
| 38 |
# --- Constants and Model Setup ---
|
| 39 |
MAX_INPUT_TOKEN_LENGTH = 4096
|
|
|
|
| 202 |
.process-button { border: none !important; color: white !important; font-weight: bold !important; background-color: blue !important;}
|
| 203 |
.process-button:hover { background-color: darkblue !important; transform: translateY(-2px) !important; box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important; }
|
| 204 |
"""
|
| 205 |
+
#with gr.Blocks(theme="bethecloud/storj_theme", css=css, js=js_func) as demo:
|
| 206 |
+
with gr.Blocks(theme="bethecloud/storj_theme") as demo:
|
| 207 |
gr.HTML("""
|
| 208 |
<div class="title" style="text-align: center">
|
| 209 |
+
<h1>OCR Comparator🥠</h1>
|
| 210 |
<p style="font-size: 1.1em; color: #6b7280; margin-bottom: 0.6em;">
|
| 211 |
Advanced Vision-Language Model for Image Content and Layout Extraction
|
| 212 |
</p>
|