Joshua Sundance Bailey commited on
Commit
aeb3333
·
unverified ·
2 Parent(s): 3f3ee2a faa513e

Merge pull request #91 from connorsutton/main

Browse files
langchain-streamlit-demo/app.py CHANGED
@@ -122,7 +122,7 @@ AZURE_KWARGS = (
122
  )
123
 
124
 
125
- @st.cache_data
126
  def get_texts_and_retriever_cacheable_wrapper(
127
  uploaded_file_bytes: bytes,
128
  openai_api_key: str,
 
122
  )
123
 
124
 
125
+ @st.cache_resource
126
  def get_texts_and_retriever_cacheable_wrapper(
127
  uploaded_file_bytes: bytes,
128
  openai_api_key: str,
langchain-streamlit-demo/llm_resources.py CHANGED
@@ -110,7 +110,6 @@ def get_llm(
110
 
111
  return None
112
 
113
-
114
  def get_texts_and_retriever(
115
  uploaded_file_bytes: bytes,
116
  openai_api_key: str,
@@ -146,7 +145,7 @@ def get_texts_and_retriever(
146
  retrievers=[bm25_retriever, faiss_retriever],
147
  weights=[0.5, 0.5],
148
  )
149
-
150
  return texts, ensemble_retriever
151
 
152
 
 
110
 
111
  return None
112
 
 
113
  def get_texts_and_retriever(
114
  uploaded_file_bytes: bytes,
115
  openai_api_key: str,
 
145
  retrievers=[bm25_retriever, faiss_retriever],
146
  weights=[0.5, 0.5],
147
  )
148
+
149
  return texts, ensemble_retriever
150
 
151
 
requirements.txt CHANGED
@@ -1,12 +1,12 @@
1
- anthropic==0.5.0
2
  faiss-cpu==1.7.4
3
- langchain==0.0.334
4
- langsmith==0.0.63
5
  numpy>=1.22.2 # not directly required, pinned by Snyk to avoid a vulnerability
6
- openai==0.28.1
7
  pillow>=10.0.1 # not directly required, pinned by Snyk to avoid a vulnerability
8
  pyarrow>=14.0.1 # not directly required, pinned by Snyk to avoid a vulnerability
9
- pypdf==3.17.0
10
  rank_bm25==0.2.2
11
  streamlit==1.28.1
12
  streamlit-feedback==0.1.2
 
1
+ anthropic==0.7.4
2
  faiss-cpu==1.7.4
3
+ langchain==0.0.340
4
+ langsmith==0.0.66
5
  numpy>=1.22.2 # not directly required, pinned by Snyk to avoid a vulnerability
6
+ openai==1.3.5
7
  pillow>=10.0.1 # not directly required, pinned by Snyk to avoid a vulnerability
8
  pyarrow>=14.0.1 # not directly required, pinned by Snyk to avoid a vulnerability
9
+ pypdf==3.17.1
10
  rank_bm25==0.2.2
11
  streamlit==1.28.1
12
  streamlit-feedback==0.1.2