Spaces:
Sleeping
Sleeping
Rattatammanoon Parwasuk commited on
Commit ·
4cbacf1
1
Parent(s): 316d875
Refine image upload area styles to improve layout and visibility, ensuring full frame display without scrollbars, and update label styles for better aesthetics in the AI License Plate Recognition System.
Browse files
app.py
CHANGED
|
@@ -314,19 +314,42 @@ CUSTOM_CSS = """
|
|
| 314 |
margin-bottom: 0.5rem !important;
|
| 315 |
}
|
| 316 |
|
| 317 |
-
/* Image upload area */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 318 |
.image-upload {
|
| 319 |
display: flex;
|
| 320 |
-
|
| 321 |
border: 2px dashed rgba(100, 116, 139, 0.6) !important;
|
| 322 |
border-radius: 16px !important;
|
| 323 |
background: rgba(30, 41, 59, 0.8) !important;
|
| 324 |
backdrop-filter: blur(10px) !important;
|
| 325 |
-webkit-backdrop-filter: blur(10px) !important;
|
| 326 |
transition: all 0.3s ease !important;
|
| 327 |
-
min-height:
|
| 328 |
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
|
| 329 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 330 |
|
| 331 |
.image-upload:hover {
|
| 332 |
border-color: var(--primary) !important;
|
|
@@ -334,15 +357,11 @@ CUSTOM_CSS = """
|
|
| 334 |
box-shadow: 0 8px 30px rgba(59, 130, 246, 0.2) !important;
|
| 335 |
}
|
| 336 |
|
| 337 |
-
/*
|
| 338 |
-
.
|
| 339 |
-
.
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
}
|
| 343 |
-
.image-upload .label-wrap,
|
| 344 |
-
.block:has(.image-upload) .label-wrap {
|
| 345 |
-
color: #3b82f6 !important;
|
| 346 |
}
|
| 347 |
|
| 348 |
/* Textbox / Textarea styling */
|
|
@@ -1196,14 +1215,14 @@ def create_demo_interface() -> gr.Blocks:
|
|
| 1196 |
# Main content area
|
| 1197 |
with gr.Row():
|
| 1198 |
# Left column - Image upload
|
| 1199 |
-
with gr.Column(scale=1):
|
| 1200 |
gr.HTML("<h3 class='section-header'>📷 อัพโหลดรูปป้ายทะเบียน</h3>")
|
| 1201 |
|
| 1202 |
image_input = gr.Image(
|
| 1203 |
label="อัพโหลดรูปภาพ",
|
| 1204 |
type="pil",
|
| 1205 |
elem_classes=["image-upload"],
|
| 1206 |
-
height=
|
| 1207 |
)
|
| 1208 |
|
| 1209 |
with gr.Accordion("⚙️ ตั้งค่าเพิ่มเติม", open=False):
|
|
|
|
| 314 |
margin-bottom: 0.5rem !important;
|
| 315 |
}
|
| 316 |
|
| 317 |
+
/* Image upload area - แสดงเต็มกรอบ ไม่ตัด ไม่มี scrollbar */
|
| 318 |
+
.image-upload,
|
| 319 |
+
.image-upload .contain,
|
| 320 |
+
.block:has(.image-upload) > div,
|
| 321 |
+
.block:has(.image-upload) {
|
| 322 |
+
min-height: 300px !important;
|
| 323 |
+
max-height: none !important;
|
| 324 |
+
overflow: visible !important;
|
| 325 |
+
height: auto !important;
|
| 326 |
+
}
|
| 327 |
.image-upload {
|
| 328 |
display: flex;
|
| 329 |
+
flex-direction: column;
|
| 330 |
border: 2px dashed rgba(100, 116, 139, 0.6) !important;
|
| 331 |
border-radius: 16px !important;
|
| 332 |
background: rgba(30, 41, 59, 0.8) !important;
|
| 333 |
backdrop-filter: blur(10px) !important;
|
| 334 |
-webkit-backdrop-filter: blur(10px) !important;
|
| 335 |
transition: all 0.3s ease !important;
|
| 336 |
+
min-height: 300px !important;
|
| 337 |
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
|
| 338 |
}
|
| 339 |
+
.image-upload label {
|
| 340 |
+
color: #60a5fa !important;
|
| 341 |
+
font-weight: 600 !important;
|
| 342 |
+
margin-bottom: 0.5rem !important;
|
| 343 |
+
}
|
| 344 |
+
/* Drop zone ภายใน Image component - ให้เต็มกรอบ */
|
| 345 |
+
.image-upload [class*="preview"],
|
| 346 |
+
.image-upload [class*="drop"],
|
| 347 |
+
.image-upload .overflow-hidden,
|
| 348 |
+
.image-upload > div {
|
| 349 |
+
min-height: 280px !important;
|
| 350 |
+
max-height: none !important;
|
| 351 |
+
overflow: visible !important;
|
| 352 |
+
}
|
| 353 |
|
| 354 |
.image-upload:hover {
|
| 355 |
border-color: var(--primary) !important;
|
|
|
|
| 357 |
box-shadow: 0 8px 30px rgba(59, 130, 246, 0.2) !important;
|
| 358 |
}
|
| 359 |
|
| 360 |
+
/* Column อัพโหลด - ไม่ตัด Drop zone ไม่มี scrollbar */
|
| 361 |
+
.column-upload,
|
| 362 |
+
.column-upload .contain {
|
| 363 |
+
overflow: visible !important;
|
| 364 |
+
max-height: none !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 365 |
}
|
| 366 |
|
| 367 |
/* Textbox / Textarea styling */
|
|
|
|
| 1215 |
# Main content area
|
| 1216 |
with gr.Row():
|
| 1217 |
# Left column - Image upload
|
| 1218 |
+
with gr.Column(scale=1, elem_classes=["column-upload"]):
|
| 1219 |
gr.HTML("<h3 class='section-header'>📷 อัพโหลดรูปป้ายทะเบียน</h3>")
|
| 1220 |
|
| 1221 |
image_input = gr.Image(
|
| 1222 |
label="อัพโหลดรูปภาพ",
|
| 1223 |
type="pil",
|
| 1224 |
elem_classes=["image-upload"],
|
| 1225 |
+
height=320
|
| 1226 |
)
|
| 1227 |
|
| 1228 |
with gr.Accordion("⚙️ ตั้งค่าเพิ่มเติม", open=False):
|
src/__pycache__/__init__.cpython-314.pyc
ADDED
|
Binary file (178 Bytes). View file
|
|
|
src/__pycache__/extractor.cpython-314.pyc
ADDED
|
Binary file (23.6 kB). View file
|
|
|
src/__pycache__/model.cpython-314.pyc
ADDED
|
Binary file (70.7 kB). View file
|
|
|