Skip to content

Commit

Permalink
Fix bug in gradio
Browse files Browse the repository at this point in the history
Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
  • Loading branch information
jaelgu committed Oct 25, 2023
1 parent 936c6b2 commit 2e2486e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gradio_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 2e2486e

Please sign in to comment.