Simplify UI by fixing defaults and renaming controls
Browse files
app.py
CHANGED
|
@@ -682,18 +682,9 @@ with gr.Blocks(title="Human Hallucination Prediction", css="""
|
|
| 682 |
|
| 683 |
# Parameters section (initially hidden)
|
| 684 |
with gr.Group(visible=False) as params_section:
|
| 685 |
-
|
| 686 |
-
|
| 687 |
-
|
| 688 |
-
value="resnet50_robust",
|
| 689 |
-
label="Model"
|
| 690 |
-
)
|
| 691 |
-
|
| 692 |
-
inference_type = gr.Dropdown(
|
| 693 |
-
choices=["Prior-Guided Drift Diffusion", "IncreaseConfidence"],
|
| 694 |
-
value="Prior-Guided Drift Diffusion",
|
| 695 |
-
label="Inference Method"
|
| 696 |
-
)
|
| 697 |
|
| 698 |
with gr.Row():
|
| 699 |
eps_slider = gr.Slider(minimum=0.0, maximum=40.0, value=40.0, step=0.01, label="Epsilon (Stimulus Fidelity)")
|
|
@@ -707,11 +698,11 @@ with gr.Blocks(title="Human Hallucination Prediction", css="""
|
|
| 707 |
|
| 708 |
with gr.Row():
|
| 709 |
step_size_slider = gr.Slider(minimum=0.01, maximum=2.0, value=1.0, step=0.01,
|
| 710 |
-
label="
|
| 711 |
layer_choice = gr.Dropdown(
|
| 712 |
choices=["all", "conv1", "bn1", "relu", "maxpool", "layer1", "layer2", "layer3", "layer4", "avgpool"],
|
| 713 |
value="all",
|
| 714 |
-
label="
|
| 715 |
)
|
| 716 |
|
| 717 |
gr.Markdown("### 🎯 Adaptive Gaussian mask (spatially varying constraint)")
|
|
@@ -887,9 +878,9 @@ with gr.Blocks(title="Human Hallucination Prediction", css="""
|
|
| 887 |
### Parameters:
|
| 888 |
- **Drift Noise**: Initial uncertainty in the prediction process
|
| 889 |
- **Diffusion Noise**: Stochastic exploration during prediction
|
| 890 |
-
- **
|
| 891 |
- **Number of Iterations**: How many prediction steps to perform
|
| 892 |
-
- **
|
| 893 |
- **Epsilon (Stimulus Fidelity)**: How closely the prediction must match the input stimulus
|
| 894 |
|
| 895 |
### Why Does This Work?
|
|
|
|
| 682 |
|
| 683 |
# Parameters section (initially hidden)
|
| 684 |
with gr.Group(visible=False) as params_section:
|
| 685 |
+
# Keep core method defaults fixed (not user-editable in simple UI)
|
| 686 |
+
model_choice = gr.State(value="resnet50_robust")
|
| 687 |
+
inference_type = gr.State(value="Prior-Guided Drift Diffusion")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 688 |
|
| 689 |
with gr.Row():
|
| 690 |
eps_slider = gr.Slider(minimum=0.0, maximum=40.0, value=40.0, step=0.01, label="Epsilon (Stimulus Fidelity)")
|
|
|
|
| 698 |
|
| 699 |
with gr.Row():
|
| 700 |
step_size_slider = gr.Slider(minimum=0.01, maximum=2.0, value=1.0, step=0.01,
|
| 701 |
+
label="Moulation Gain")
|
| 702 |
layer_choice = gr.Dropdown(
|
| 703 |
choices=["all", "conv1", "bn1", "relu", "maxpool", "layer1", "layer2", "layer3", "layer4", "avgpool"],
|
| 704 |
value="all",
|
| 705 |
+
label="Hierarchy Level"
|
| 706 |
)
|
| 707 |
|
| 708 |
gr.Markdown("### 🎯 Adaptive Gaussian mask (spatially varying constraint)")
|
|
|
|
| 878 |
### Parameters:
|
| 879 |
- **Drift Noise**: Initial uncertainty in the prediction process
|
| 880 |
- **Diffusion Noise**: Stochastic exploration during prediction
|
| 881 |
+
- **Moulation Gain**: Speed of convergence to the predicted hallucination
|
| 882 |
- **Number of Iterations**: How many prediction steps to perform
|
| 883 |
+
- **Hierarchy Level**: Which perceptual level to predict from (early edges vs. high-level objects)
|
| 884 |
- **Epsilon (Stimulus Fidelity)**: How closely the prediction must match the input stimulus
|
| 885 |
|
| 886 |
### Why Does This Work?
|