Skip to content

Commit

Permalink
Fixes #1466
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudotensor committed Mar 14, 2024
1 parent 5371b5e commit 2439c32
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/gpt_langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
get_list_or_str, have_pillow, only_selenium, only_playwright, only_unstructured_urls, get_short_name, \
get_accordion, have_jq, get_doc, get_source, have_chromamigdb, get_token_count, reverse_ucurve_list, get_size, \
get_test_name_core, download_simple, have_fiftyone, have_librosa, return_good_url, n_gpus_global, \
get_accordion_named, hyde_titles, have_cv2, FullSet, create_relative_symlink, split_list, get_gradio_tmp, merge_dict
get_accordion_named, hyde_titles, have_cv2, FullSet, create_relative_symlink, split_list, get_gradio_tmp, \
merge_dict
from enums import DocumentSubset, no_lora_str, model_token_mapping, source_prefix, source_postfix, non_query_commands, \
LangChainAction, LangChainMode, DocumentChoice, LangChainTypes, font_size, head_acc, super_source_prefix, \
super_source_postfix, langchain_modes_intrinsic, get_langchain_prompts, LangChainAgent, docs_joiner_default, \
Expand Down Expand Up @@ -8213,8 +8214,10 @@ def get_source_files(db=None, exceptions=None, metadatas=None):

# below automatically de-dups
# non-exception cases only
small_dict = {get_url(x['source'], from_str=True, short_name=True): get_short_name(x.get('head')) for x in
metadatas if x.get('page', 0) in [0, 1] and not x.get('exception', '')}
small_dict = dict()
for page_0 in [1, 0]:
small_dict.update({get_url(x['source'], from_str=True, short_name=True): get_short_name(x.get('head')) for x in
metadatas if x.get('page', 0) in [page_0] and not x.get('exception', '')})
# if small_dict is empty dict, that's ok
df = pd.DataFrame(small_dict.items(), columns=['source', 'head'])
df.index = df.index + 1
Expand Down

0 comments on commit 2439c32

Please sign in to comment.