Skip to content

Commit

Permalink
fix expand gdrive folders and accept_multiple_files clash
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Feb 12, 2024
1 parent 64b7dfc commit dc70569
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions daras_ai_v2/doc_search_settings_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ def document_uploader(
)
st.checkbox("Submit Links in Bulk", key=f"__custom_checkbox_{key}")
documents = st.session_state.get(key, [])
try:
documents = list(_expand_gdrive_folders(documents))
except Exception as e:
capture_exception(e)
st.error(f"Error expanding gdrive folders: {e}")
if accept_multiple_files:
try:
documents = list(_expand_gdrive_folders(documents))
except Exception as e:
capture_exception(e)
st.error(f"Error expanding gdrive folders: {e}")
st.session_state[key] = documents
st.session_state[custom_key] = "\n".join(documents)
return documents
Expand Down

0 comments on commit dc70569

Please sign in to comment.