Spaces:
Running
on
Zero
Running
on
Zero
tori29umai
commited on
Commit
•
806c72c
1
Parent(s):
6d034d7
Update app.py
Browse files
app.py
CHANGED
@@ -266,7 +266,7 @@ def build_gradio_interface():
|
|
266 |
value=config['Models'].get('DEFAULT_GEN_MODEL', '')
|
267 |
)
|
268 |
model_dropdown.change(
|
269 |
-
|
270 |
inputs=[model_dropdown],
|
271 |
outputs=[output]
|
272 |
)
|
@@ -278,7 +278,7 @@ def build_gradio_interface():
|
|
278 |
lines=5
|
279 |
)
|
280 |
gen_author_description.change(
|
281 |
-
|
282 |
inputs=[gen_author_description],
|
283 |
outputs=[output]
|
284 |
)
|
@@ -298,12 +298,10 @@ def build_gradio_interface():
|
|
298 |
input_component = gr.Textbox(label=key, value=value)
|
299 |
|
300 |
input_component.change(
|
301 |
-
|
302 |
-
input_component.change(
|
303 |
-
partial(ConfigManager.update_setting, 'GenerateParameters', key),
|
304 |
inputs=[input_component],
|
305 |
outputs=[output]
|
306 |
-
)
|
307 |
|
308 |
apply_settings_button = gr.Button("設定を適用")
|
309 |
apply_settings_button.click(
|
|
|
266 |
value=config['Models'].get('DEFAULT_GEN_MODEL', '')
|
267 |
)
|
268 |
model_dropdown.change(
|
269 |
+
lambda x: ConfigManager.update_setting('Models', 'DEFAULT_GEN_MODEL', x, DEFAULT_INI_FILE),
|
270 |
inputs=[model_dropdown],
|
271 |
outputs=[output]
|
272 |
)
|
|
|
278 |
lines=5
|
279 |
)
|
280 |
gen_author_description.change(
|
281 |
+
lambda x: ConfigManager.update_setting('Character', 'gen_author_description', x, DEFAULT_INI_FILE),
|
282 |
inputs=[gen_author_description],
|
283 |
outputs=[output]
|
284 |
)
|
|
|
298 |
input_component = gr.Textbox(label=key, value=value)
|
299 |
|
300 |
input_component.change(
|
301 |
+
lambda x, k=key: ConfigManager.update_setting('GenerateParameters', k, str(x), DEFAULT_INI_FILE),
|
|
|
|
|
302 |
inputs=[input_component],
|
303 |
outputs=[output]
|
304 |
+
)
|
305 |
|
306 |
apply_settings_button = gr.Button("設定を適用")
|
307 |
apply_settings_button.click(
|