LPX
commited on
Commit
·
392abb7
1
Parent(s):
6432eef
refactor: update API names for prediction functions to improve clarity and consistency
Browse files- app_mcp.py +12 -4
app_mcp.py
CHANGED
@@ -533,7 +533,7 @@ with gr.Blocks(css="#post-gallery { overflow: hidden !important;} .grid-wrap{ ov
|
|
533 |
fn=predict_image_with_json,
|
534 |
inputs=inputs,
|
535 |
outputs=outputs,
|
536 |
-
api_name="
|
537 |
)
|
538 |
augment_button.click( # Connect Augment button to the function
|
539 |
fn=predict_image_with_json,
|
@@ -546,7 +546,7 @@ with gr.Blocks(css="#post-gallery { overflow: hidden !important;} .grid-wrap{ ov
|
|
546 |
sharpen_slider
|
547 |
],
|
548 |
outputs=outputs,
|
549 |
-
api_name="
|
550 |
)
|
551 |
with gr.Tab("🙈 Project Introduction"):
|
552 |
gr.Markdown(QUICK_INTRO)
|
@@ -564,12 +564,20 @@ with gr.Blocks(css="#post-gallery { overflow: hidden !important;} .grid-wrap{ ov
|
|
564 |
outputs=gr.Image(type="pil"),
|
565 |
title="Wavelet-Based Noise Analysis",
|
566 |
description="Analyzes image noise patterns using wavelet decomposition. This tool helps detect compression artifacts and artificial noise patterns that may indicate image manipulation. Higher noise levels in specific regions can reveal areas of potential tampering.",
|
567 |
-
api_name="
|
568 |
)
|
569 |
|
570 |
|
571 |
with gr.Tab("Bit Plane Values", visible=False):
|
572 |
gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
573 |
fn=bit_plane_extractor,
|
574 |
inputs=[
|
575 |
gr.Image(type="pil"),
|
@@ -580,7 +588,7 @@ with gr.Blocks(css="#post-gallery { overflow: hidden !important;} .grid-wrap{ ov
|
|
580 |
outputs=gr.Image(type="pil"),
|
581 |
title="Bit Plane Analysis",
|
582 |
description="Extracts and visualizes individual bit planes from different color channels. This forensic tool helps identify hidden patterns and artifacts in image data that may indicate manipulation. Different bit planes can reveal inconsistencies in image processing or editing.",
|
583 |
-
api_name="
|
584 |
)
|
585 |
# with gr.Tab("EXIF Full Dump"):
|
586 |
# gr.Interface(
|
|
|
533 |
fn=predict_image_with_json,
|
534 |
inputs=inputs,
|
535 |
outputs=outputs,
|
536 |
+
api_name="/predict"
|
537 |
)
|
538 |
augment_button.click( # Connect Augment button to the function
|
539 |
fn=predict_image_with_json,
|
|
|
546 |
sharpen_slider
|
547 |
],
|
548 |
outputs=outputs,
|
549 |
+
api_name="/augment"
|
550 |
)
|
551 |
with gr.Tab("🙈 Project Introduction"):
|
552 |
gr.Markdown(QUICK_INTRO)
|
|
|
564 |
outputs=gr.Image(type="pil"),
|
565 |
title="Wavelet-Based Noise Analysis",
|
566 |
description="Analyzes image noise patterns using wavelet decomposition. This tool helps detect compression artifacts and artificial noise patterns that may indicate image manipulation. Higher noise levels in specific regions can reveal areas of potential tampering.",
|
567 |
+
api_name="/tool_waveletnoise"
|
568 |
)
|
569 |
|
570 |
|
571 |
with gr.Tab("Bit Plane Values", visible=False):
|
572 |
gr.Interface(
|
573 |
+
"""Forensics Tool: Bit Plane Extractor
|
574 |
+
|
575 |
+
Args:
|
576 |
+
image: PIL Image to analyze
|
577 |
+
channel: Color channel to extract bit plane from ("Luminance", "Red", "Green", "Blue", "RGB Norm")
|
578 |
+
bit_plane: Bit plane index to extract (0-7)
|
579 |
+
filter_type: Filter to apply ("Disabled", "Median", "Gaussian")
|
580 |
+
"""
|
581 |
fn=bit_plane_extractor,
|
582 |
inputs=[
|
583 |
gr.Image(type="pil"),
|
|
|
588 |
outputs=gr.Image(type="pil"),
|
589 |
title="Bit Plane Analysis",
|
590 |
description="Extracts and visualizes individual bit planes from different color channels. This forensic tool helps identify hidden patterns and artifacts in image data that may indicate manipulation. Different bit planes can reveal inconsistencies in image processing or editing.",
|
591 |
+
api_name="/tool_bitplane"
|
592 |
)
|
593 |
# with gr.Tab("EXIF Full Dump"):
|
594 |
# gr.Interface(
|