Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -285,34 +285,43 @@ body, .gradio-container {
|
|
| 285 |
color: #e0e7ff !important;
|
| 286 |
}
|
| 287 |
|
| 288 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 289 |
.gradio-container button, .gradio-container img {
|
| 290 |
-
z-index:
|
| 291 |
}
|
| 292 |
|
| 293 |
-
/*
|
| 294 |
-
div[data-testid="image"]
|
| 295 |
-
.image-container,
|
| 296 |
-
[class*="image"],
|
| 297 |
-
.input-image {
|
| 298 |
background: transparent !important;
|
|
|
|
| 299 |
backdrop-filter: none !important;
|
| 300 |
}
|
| 301 |
|
| 302 |
-
/*
|
| 303 |
-
|
| 304 |
-
[data-testid="image"]
|
| 305 |
-
.upload-icon,
|
| 306 |
-
.image-container .icon {
|
| 307 |
display: none !important;
|
| 308 |
-
opacity: 0 !important;
|
| 309 |
-
visibility: hidden !important;
|
| 310 |
}
|
| 311 |
|
| 312 |
-
/*
|
| 313 |
-
.
|
| 314 |
-
|
| 315 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
}
|
| 317 |
|
| 318 |
@keyframes gradient {
|
|
@@ -401,10 +410,11 @@ with gr.Blocks(title="Ultra OCR", theme=theme, css=custom_css) as demo:
|
|
| 401 |
with gr.Column(scale=4):
|
| 402 |
input_img = gr.Image(
|
| 403 |
type="pil",
|
| 404 |
-
label="
|
| 405 |
height=500,
|
| 406 |
sources=['upload', 'clipboard'],
|
| 407 |
-
format="png"
|
|
|
|
| 408 |
)
|
| 409 |
run_btn = gr.Button("⚡ Start Transcription", variant="primary", size="lg")
|
| 410 |
|
|
|
|
| 285 |
color: #e0e7ff !important;
|
| 286 |
}
|
| 287 |
|
| 288 |
+
/*
|
| 289 |
+
UI Fixes for deployment
|
| 290 |
+
- Ensure inputs and buttons are clearly visible
|
| 291 |
+
- Remove overlay icons on images
|
| 292 |
+
*/
|
| 293 |
+
|
| 294 |
+
/* Reset z-indexes to avoid layering issues */
|
| 295 |
.gradio-container button, .gradio-container img {
|
| 296 |
+
z-index: auto;
|
| 297 |
}
|
| 298 |
|
| 299 |
+
/* Specific fix for the main image container to prevent glass overlay */
|
| 300 |
+
.image-container, div[data-testid="image"] {
|
|
|
|
|
|
|
|
|
|
| 301 |
background: transparent !important;
|
| 302 |
+
border: none !important;
|
| 303 |
backdrop-filter: none !important;
|
| 304 |
}
|
| 305 |
|
| 306 |
+
/* Hide the 'upload' icon/placeholder when an image is showing */
|
| 307 |
+
/* This targets the SVG usually found in the center */
|
| 308 |
+
div[data-testid="image"] svg {
|
|
|
|
|
|
|
| 309 |
display: none !important;
|
|
|
|
|
|
|
| 310 |
}
|
| 311 |
|
| 312 |
+
/* Styling for the buttons to pop out */
|
| 313 |
+
button.primary {
|
| 314 |
+
background: linear-gradient(90deg, #8b5cf6, #d946ef) !important;
|
| 315 |
+
border: none !important;
|
| 316 |
+
color: white !important;
|
| 317 |
+
box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4) !important;
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
/* Hide the label 'Document Source' if it overlaps */
|
| 321 |
+
label span {
|
| 322 |
+
color: #e0e7ff !important;
|
| 323 |
+
font-weight: bold;
|
| 324 |
+
font-size: 1.1em;
|
| 325 |
}
|
| 326 |
|
| 327 |
@keyframes gradient {
|
|
|
|
| 410 |
with gr.Column(scale=4):
|
| 411 |
input_img = gr.Image(
|
| 412 |
type="pil",
|
| 413 |
+
label="Document Source",
|
| 414 |
height=500,
|
| 415 |
sources=['upload', 'clipboard'],
|
| 416 |
+
format="png",
|
| 417 |
+
show_label=False # Hide label to prevent text overlay on image
|
| 418 |
)
|
| 419 |
run_btn = gr.Button("⚡ Start Transcription", variant="primary", size="lg")
|
| 420 |
|