Skip to content

Commit

Permalink
Fix bug in gradio (#87)
Browse files Browse the repository at this point in the history
Signed-off-by: Jael Gu <[email protected]>
  • Loading branch information
jaelgu authored Oct 25, 2023
1 parent 936c6b2 commit 37db7d6
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 37db7d6

Please sign in to comment.