Skip to content

Commit d0d8eb4

Browse files
committed
fixed minor issues for PR
1 parent 40776d3 commit d0d8eb4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/ai_agent/ui/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -712,17 +712,17 @@ def create_interface():
712712
def _run_selected_demo(selected_name: str, demo_url: str, uploaded_files):
713713
# Use the original uploaded file(s) instead of preview; prefer .tif/.tiff if present
714714
if not selected_name:
715-
return gr.update(visible=False), gr.update(value=None, visible=False), gr.update(value="⚠️ Select a tool first.", visible=True)
715+
return gr.update(visible=False), gr.update(visible=False, value=None), gr.update(value=None, visible=False), gr.update(value="⚠️ Select a tool first.", visible=True)
716716
paths = _coerce_gradio_files_to_paths(uploaded_files)
717717
if not paths:
718-
return gr.update(visible=False), gr.update(value=None, visible=False), gr.update(value="⚠️ Please upload an image first.", visible=True)
718+
return gr.update(visible=False), gr.update(visible=False, value=None), gr.update(value=None, visible=False), gr.update(value="⚠️ Please upload an image first.", visible=True)
719719
# prefer tif/tiff if available (per remote app constraints), else first file
720720
pick = None
721721
for p in paths:
722722
ext = os.path.splitext(p)[1].lower()
723723
if ext in (".tif", ".tiff"):
724724
pick = p
725-
break
725+
break
726726
if not pick:
727727
pick = paths[0]
728728
try:

0 commit comments

Comments
 (0)