use slider and radio
Browse files
app.py
CHANGED
|
@@ -83,7 +83,7 @@ def get_interface(param_info, numeric_index, choice_index):
|
|
| 83 |
scaled_bounds = scaler.transform([[bound] for bound in param_info["bounds"]])
|
| 84 |
label = f"f1" if key == "train_frac" else f"x{numeric_index}"
|
| 85 |
return (
|
| 86 |
-
gr.
|
| 87 |
value=scaled_value,
|
| 88 |
minimum=scaled_bounds[0][0],
|
| 89 |
maximum=scaled_bounds[1][0],
|
|
@@ -95,7 +95,7 @@ def get_interface(param_info, numeric_index, choice_index):
|
|
| 95 |
)
|
| 96 |
elif param_info["type"] == "choice":
|
| 97 |
return (
|
| 98 |
-
gr.
|
| 99 |
choices=[
|
| 100 |
f"c{choice_index}_{i}" for i in range(len(param_info["values"]))
|
| 101 |
],
|
|
|
|
| 83 |
scaled_bounds = scaler.transform([[bound] for bound in param_info["bounds"]])
|
| 84 |
label = f"f1" if key == "train_frac" else f"x{numeric_index}"
|
| 85 |
return (
|
| 86 |
+
gr.Slider( # Change this line
|
| 87 |
value=scaled_value,
|
| 88 |
minimum=scaled_bounds[0][0],
|
| 89 |
maximum=scaled_bounds[1][0],
|
|
|
|
| 95 |
)
|
| 96 |
elif param_info["type"] == "choice":
|
| 97 |
return (
|
| 98 |
+
gr.Radio(
|
| 99 |
choices=[
|
| 100 |
f"c{choice_index}_{i}" for i in range(len(param_info["values"]))
|
| 101 |
],
|