jost commited on
Commit
becac5e
1 Parent(s): 76a8cb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -36,15 +36,15 @@ def update_direct_steering_options(prompt_type):
36
  # This function returns different choices based on the selected prompt manipulation
37
  options = {
38
  "None": [],
39
- "Impersonation (direct steering)": ["Option 1", "Option 2", "Option 3"],
40
- "Most similar RAG (indirect steering with related context)": ["Option A", "Option B", "Option C"],
41
- "Random RAG (indirect steering with randomized context)": ["Random 1", "Random 2", "Random 3"]
42
  }
43
 
44
- #direct_steering_option.update(choices=options.get(prompt_type, []))
45
- choices = options.get(prompt_type, [])
46
- return gr.Dropdown(choices=choices, interactive=True)
47
- #return options.get(prompt_type, [])
48
 
49
  def main():
50
  description = "This is a simple interface to compare two model prodided by Anyscale. Please enter your API key and your message."
 
36
  # This function returns different choices based on the selected prompt manipulation
37
  options = {
38
  "None": [],
39
+ "Impersonation (direct steering)": ["Die Linke", "Bündnis 90/Die Grünen", "AfD", "CDU/CSU"],
40
+ "Most similar RAG (indirect steering with related context)": ["Authoritarian-left", "Libertarian-left", "Authoritarian-right", "Libertarian-right"],
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 = choices[0] if choices else []
46
+
47
+ return gr.Dropdown(choices=choices, value=default_value, interactive=True)
48
 
49
  def main():
50
  description = "This is a simple interface to compare two model prodided by Anyscale. Please enter your API key and your message."