minor: ui
Browse files
app.py
CHANGED
|
@@ -282,8 +282,9 @@ def predict_image_with_html(img, confidence_threshold, augment_methods, rotate_d
|
|
| 282 |
|
| 283 |
# Second pass - enhanced visibility
|
| 284 |
ela2 = ELA(img_np, quality=75, scale=75, contrast=25, linear=False, grayscale=True)
|
|
|
|
| 285 |
|
| 286 |
-
forensics_images = [img_pil, ela1, ela2, gradient_image, minmax_image]
|
| 287 |
|
| 288 |
html_content = generate_results_html(results)
|
| 289 |
return img_pil, forensics_images, html_content
|
|
@@ -319,7 +320,7 @@ with gr.Blocks(css="#post-gallery { overflow: hidden !important;} .grid-wrap{ ov
|
|
| 319 |
with gr.Column(scale=2):
|
| 320 |
# Custom HTML component to display results in 5 columns
|
| 321 |
results_html = gr.HTML(label="Model Predictions")
|
| 322 |
-
forensics_gallery = gr.Gallery(label="Post Processed Images", visible=True, columns=[
|
| 323 |
|
| 324 |
outputs = [image_output, forensics_gallery, results_html]
|
| 325 |
|
|
|
|
| 282 |
|
| 283 |
# Second pass - enhanced visibility
|
| 284 |
ela2 = ELA(img_np, quality=75, scale=75, contrast=25, linear=False, grayscale=True)
|
| 285 |
+
ela3 = ELA(img_np, quality=75, scale=75, contrast=25, linear=False, grayscale=False)
|
| 286 |
|
| 287 |
+
forensics_images = [img_pil, ela1, ela2, ela3, gradient_image, minmax_image]
|
| 288 |
|
| 289 |
html_content = generate_results_html(results)
|
| 290 |
return img_pil, forensics_images, html_content
|
|
|
|
| 320 |
with gr.Column(scale=2):
|
| 321 |
# Custom HTML component to display results in 5 columns
|
| 322 |
results_html = gr.HTML(label="Model Predictions")
|
| 323 |
+
forensics_gallery = gr.Gallery(label="Post Processed Images", visible=True, columns=[3], rows=[2], container=False, height="auto", object_fit="contain", elem_id="post-gallery")
|
| 324 |
|
| 325 |
outputs = [image_output, forensics_gallery, results_html]
|
| 326 |
|