Update app.py
Browse files
app.py
CHANGED
@@ -43,12 +43,6 @@ for act in os.listdir(model_root):
|
|
43 |
|
44 |
activations = sorted(activations)
|
45 |
|
46 |
-
def update_seeds(activation):
|
47 |
-
return {"choices": seeds_dict[activation], "value": seeds_dict[activation][0]}
|
48 |
-
|
49 |
-
def update_neurons(activation, seed):
|
50 |
-
neurons = neurons_dict[(activation, seed)]
|
51 |
-
return {"choices": neurons, "value": neurons[0]}
|
52 |
|
53 |
# Step 3: Load linear models
|
54 |
# linear_rgb_path = os.path.join(unzip_dir, "linear_models/linear_rgb.joblib")
|
@@ -81,11 +75,11 @@ def predict(r, g, b, activation, seed, neurons):
|
|
81 |
# Dynamic components for UI
|
82 |
|
83 |
def update_seeds(activation):
|
84 |
-
return
|
85 |
|
86 |
def update_neurons(activation, seed):
|
87 |
neurons = neurons_dict[(activation, seed)]
|
88 |
-
return
|
89 |
|
90 |
# Gradio Interface
|
91 |
with gr.Blocks() as demo:
|
|
|
43 |
|
44 |
activations = sorted(activations)
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
# Step 3: Load linear models
|
48 |
# linear_rgb_path = os.path.join(unzip_dir, "linear_models/linear_rgb.joblib")
|
|
|
75 |
# Dynamic components for UI
|
76 |
|
77 |
def update_seeds(activation):
|
78 |
+
return {"choices": seeds_dict[activation], "value": seeds_dict[activation][0]}
|
79 |
|
80 |
def update_neurons(activation, seed):
|
81 |
neurons = neurons_dict[(activation, seed)]
|
82 |
+
return {"choices": neurons, "value": neurons[0]}
|
83 |
|
84 |
# Gradio Interface
|
85 |
with gr.Blocks() as demo:
|