Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 =
|
| 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 |
|