Add supplementary info text for the input parameters.
Browse files
app.py
CHANGED
|
@@ -199,12 +199,21 @@ def main():
|
|
| 199 |
# --- Method-specific Parameters ---
|
| 200 |
with gr.Group(visible=True) as traditional_params:
|
| 201 |
gr.Markdown("### Traditional Method Parameters")
|
| 202 |
-
split_joint = gr.Checkbox(
|
| 203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
output_mode = gr.Dropdown(
|
| 205 |
label="Output Mode",
|
| 206 |
choices=['bounding', 'masked'],
|
| 207 |
-
value='bounding'
|
|
|
|
| 208 |
)
|
| 209 |
|
| 210 |
with gr.Group(visible=False) as ai_params:
|
|
|
|
| 199 |
# --- Method-specific Parameters ---
|
| 200 |
with gr.Group(visible=True) as traditional_params:
|
| 201 |
gr.Markdown("### Traditional Method Parameters")
|
| 202 |
+
split_joint = gr.Checkbox(
|
| 203 |
+
label="Split Joint Panels",
|
| 204 |
+
value=False,
|
| 205 |
+
info="For panels that are touching or share a single border line. This algorithm actively tries to draw a separation line between them. Useful if multiple panels are being detected as one large block, but may occasionally split a single large panel by mistake."
|
| 206 |
+
)
|
| 207 |
+
fallback = gr.Checkbox(
|
| 208 |
+
label="Fallback to Threshold Extraction",
|
| 209 |
+
value=True,
|
| 210 |
+
info="If the main algorithm fails to find multiple panels (e.g., on a borderless page or a full-bleed splash page), this enables a secondary, simpler extraction method. It's a 'safety net' that can find panels when the primary method cannot."
|
| 211 |
+
)
|
| 212 |
output_mode = gr.Dropdown(
|
| 213 |
label="Output Mode",
|
| 214 |
choices=['bounding', 'masked'],
|
| 215 |
+
value='bounding',
|
| 216 |
+
info="bounding: Crops a rectangular area around each panel. Best for general use. \nmasked: Crops along the exact, non-rectangular shape of the panel, filling the outside with a background color. Best for irregularly shaped panels."
|
| 217 |
)
|
| 218 |
|
| 219 |
with gr.Group(visible=False) as ai_params:
|