From 2e2486ee065a999a953104b88b75b8714d149709 Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Wed, 25 Oct 2023 10:25:06 +0800 Subject: [PATCH] Fix bug in gradio Signed-off-by: Jael Gu --- gradio_demo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gradio_demo.py b/gradio_demo.py index edf720b..a59282a 100644 --- a/gradio_demo.py +++ b/gradio_demo.py @@ -44,9 +44,10 @@ def clear_memory(project, session): def add_project(project, data_url: str = None, data_file: object = None): if data_file: - return insert(data_src=data_file.name, project=project, source_type='file') + num_chunks, _ = insert(data_src=data_file.name, project=project, source_type='file') if data_url: - return insert(data_src=data_url, project=project, source_type='url') + num_chunks, _ = insert(data_src=data_url, project=project, source_type='url') + return num_chunks def check_project(project):