jost commited on
Commit
d16661c
·
verified ·
1 Parent(s): 4651068

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -41,8 +41,10 @@ def update_direct_steering_options(prompt_type):
41
  "Random RAG (indirect steering with randomized context)": ["Authoritarian-left", "Libertarian-left", "Authoritarian-right", "Libertarian-right"]
42
  }
43
 
 
 
44
  # Set the first option as default, or an empty list if no options are available
45
- default_value = options[0] if options else []
46
 
47
  return gr.Dropdown(choices=choices, value=default_value, interactive=True)
48
 
 
41
  "Random RAG (indirect steering with randomized context)": ["Authoritarian-left", "Libertarian-left", "Authoritarian-right", "Libertarian-right"]
42
  }
43
 
44
+ choices = options.get(prompt_type, [])
45
+
46
  # Set the first option as default, or an empty list if no options are available
47
+ default_value = choices[0] if choices else []
48
 
49
  return gr.Dropdown(choices=choices, value=default_value, interactive=True)
50