Spaces:
Runtime error
Runtime error
Handling jinja in UI
Browse files
utils.py
CHANGED
@@ -120,6 +120,10 @@ def render_config(config, component, help_str=None, parent_key=None):
|
|
120 |
options = [True, False]
|
121 |
selected_option = component.radio(f"{prefix}{k}", options, options.index(v))
|
122 |
config[k] = bool(selected_option)
|
|
|
|
|
|
|
|
|
123 |
else:
|
124 |
tokens = k.split("_")
|
125 |
is_secret = tokens[-1] in ["key", "password", "token", "secret"]
|
|
|
120 |
options = [True, False]
|
121 |
selected_option = component.radio(f"{prefix}{k}", options, options.index(v))
|
122 |
config[k] = bool(selected_option)
|
123 |
+
elif k == 'jinja_template':
|
124 |
+
config[k] = component.text_area(
|
125 |
+
f"{prefix}{k}", v, help="Jinja Template"
|
126 |
+
)
|
127 |
else:
|
128 |
tokens = k.split("_")
|
129 |
is_secret = tokens[-1] in ["key", "password", "token", "secret"]
|