neuralworm commited on
Commit
d6b73ac
·
verified ·
1 Parent(s): 8a082d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -27,7 +27,7 @@ def run_auto_suite_display(model_id, num_steps, seed, experiment_name, progress=
27
  """Wrapper, der die speziellen Plots für die verschiedenen Experimente handhaben kann."""
28
  try:
29
  summary_df, plot_df, all_results = run_auto_suite(model_id, int(num_steps), int(seed), experiment_name, progress)
30
-
31
  dataframe_component = gr.DataFrame(label="Comparative Statistical Signature", value=summary_df, wrap=True, row_count=(len(summary_df), "dynamic"))
32
 
33
  # FINALE KORREKTUR: Robuste Plot-Parameter-Logik
@@ -35,7 +35,7 @@ def run_auto_suite_display(model_id, num_steps, seed, experiment_name, progress=
35
  "title": "Comparative Cognitive Dynamics",
36
  "color_legend_position": "bottom", "show_label": True, "height": 400, "interactive": True
37
  }
38
-
39
  if experiment_name == "ACT Titration (Point of No Return)":
40
  plot_params.update({
41
  "x": "Patch Step", "y": "Post-Patch Mean Delta", "color": None,
@@ -74,12 +74,12 @@ with gr.Blocks(theme=theme, title="Cognitive Seismograph 2.3") as demo:
74
  manual_prompt_type = gr.Radio(choices=list(RESONANCE_PROMPTS.keys()), value="resonance_prompt", label="Prompt Type")
75
  manual_seed = gr.Slider(1, 1000, 42, step=1, label="Seed")
76
  manual_num_steps = gr.Slider(50, 1000, 300, step=10, label="Number of Internal Steps")
77
-
78
  gr.Markdown("### 2. Modulation Parameters")
79
  manual_concept = gr.Textbox(label="Concept to Inject", placeholder="e.g., 'calmness'")
80
  manual_strength = gr.Slider(0.0, 5.0, 1.5, step=0.1, label="Injection Strength")
81
  manual_run_btn = gr.Button("Run Single Analysis", variant="primary")
82
-
83
  with gr.Column(scale=2):
84
  gr.Markdown("### Single Run Results")
85
  manual_verdict = gr.Markdown("Analysis results will appear here.")
@@ -102,12 +102,12 @@ with gr.Blocks(theme=theme, title="Cognitive Seismograph 2.3") as demo:
102
  auto_num_steps = gr.Slider(50, 1000, 300, step=10, label="Steps per Run")
103
  auto_seed = gr.Slider(1, 1000, 42, step=1, label="Seed")
104
  auto_experiment_name = gr.Dropdown(
105
- choices=list(get_curated_experiments().keys()),
106
- value="Causal Verification & Crisis Dynamics",
107
  label="Curated Experiment Protocol"
108
  )
109
  auto_run_btn = gr.Button("Run Curated Auto-Experiment", variant="primary")
110
-
111
  with gr.Column(scale=2):
112
  gr.Markdown("### Suite Results Summary")
113
  # Initialisiere den Plot mit den Default-Parametern
@@ -115,7 +115,7 @@ with gr.Blocks(theme=theme, title="Cognitive Seismograph 2.3") as demo:
115
  auto_summary_df = gr.DataFrame(label="Comparative Statistical Signature", wrap=True)
116
  with gr.Accordion("Raw JSON for all runs", open=False):
117
  auto_raw_json = gr.JSON()
118
-
119
  auto_run_btn.click(
120
  fn=run_auto_suite_display,
121
  inputs=[auto_model_id, auto_num_steps, auto_seed, auto_experiment_name],
@@ -123,4 +123,4 @@ with gr.Blocks(theme=theme, title="Cognitive Seismograph 2.3") as demo:
123
  )
124
 
125
  if __name__ == "__main__":
126
- demo.launch(server_name="0.0.0.0", server_port=7860, debug=True)
 
27
  """Wrapper, der die speziellen Plots für die verschiedenen Experimente handhaben kann."""
28
  try:
29
  summary_df, plot_df, all_results = run_auto_suite(model_id, int(num_steps), int(seed), experiment_name, progress)
30
+
31
  dataframe_component = gr.DataFrame(label="Comparative Statistical Signature", value=summary_df, wrap=True, row_count=(len(summary_df), "dynamic"))
32
 
33
  # FINALE KORREKTUR: Robuste Plot-Parameter-Logik
 
35
  "title": "Comparative Cognitive Dynamics",
36
  "color_legend_position": "bottom", "show_label": True, "height": 400, "interactive": True
37
  }
38
+
39
  if experiment_name == "ACT Titration (Point of No Return)":
40
  plot_params.update({
41
  "x": "Patch Step", "y": "Post-Patch Mean Delta", "color": None,
 
74
  manual_prompt_type = gr.Radio(choices=list(RESONANCE_PROMPTS.keys()), value="resonance_prompt", label="Prompt Type")
75
  manual_seed = gr.Slider(1, 1000, 42, step=1, label="Seed")
76
  manual_num_steps = gr.Slider(50, 1000, 300, step=10, label="Number of Internal Steps")
77
+
78
  gr.Markdown("### 2. Modulation Parameters")
79
  manual_concept = gr.Textbox(label="Concept to Inject", placeholder="e.g., 'calmness'")
80
  manual_strength = gr.Slider(0.0, 5.0, 1.5, step=0.1, label="Injection Strength")
81
  manual_run_btn = gr.Button("Run Single Analysis", variant="primary")
82
+
83
  with gr.Column(scale=2):
84
  gr.Markdown("### Single Run Results")
85
  manual_verdict = gr.Markdown("Analysis results will appear here.")
 
102
  auto_num_steps = gr.Slider(50, 1000, 300, step=10, label="Steps per Run")
103
  auto_seed = gr.Slider(1, 1000, 42, step=1, label="Seed")
104
  auto_experiment_name = gr.Dropdown(
105
+ choices=list(get_curated_experiments().keys()),
106
+ value="Causal Verification & Crisis Dynamics",
107
  label="Curated Experiment Protocol"
108
  )
109
  auto_run_btn = gr.Button("Run Curated Auto-Experiment", variant="primary")
110
+
111
  with gr.Column(scale=2):
112
  gr.Markdown("### Suite Results Summary")
113
  # Initialisiere den Plot mit den Default-Parametern
 
115
  auto_summary_df = gr.DataFrame(label="Comparative Statistical Signature", wrap=True)
116
  with gr.Accordion("Raw JSON for all runs", open=False):
117
  auto_raw_json = gr.JSON()
118
+
119
  auto_run_btn.click(
120
  fn=run_auto_suite_display,
121
  inputs=[auto_model_id, auto_num_steps, auto_seed, auto_experiment_name],
 
123
  )
124
 
125
  if __name__ == "__main__":
126
+ demo.launch(server_name="0.0.0.0", server_port=7860, debug=True)