From b99f47320b3ae0cd8773388625520117e23e9e64 Mon Sep 17 00:00:00 2001 From: tcsenpai Date: Fri, 23 May 2025 10:32:20 +0200 Subject: [PATCH] bugfix --- app.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index a046ccb..0db0c81 100644 --- a/app.py +++ b/app.py @@ -236,7 +236,11 @@ def create_interface(): return checked def update_model_visibility(visible): - return gr.Dropdown.update(visible=visible) + if visible: + return gr.Dropdown.update( + visible=True, value=DEFAULT_OLLAMA_MODEL + ) + return gr.Dropdown.update(visible=False) summarize_checkbox.change( fn=toggle_summary, @@ -348,7 +352,11 @@ def create_interface(): return checked def update_yt_model_visibility(visible): - return gr.Dropdown.update(visible=visible) + if visible: + return gr.Dropdown.update( + visible=True, value=DEFAULT_OLLAMA_MODEL + ) + return gr.Dropdown.update(visible=False) yt_summarize_checkbox.change( fn=toggle_yt_summary,