sgbaird commited on
Commit
de22f41
1 Parent(s): 45b3fc1

use slider and radio

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.Number(
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.Dropdown(
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
  ],