pgurazada1 commited on
Commit
1e209d0
1 Parent(s): e7c2848

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,7 +6,7 @@ from openai import AzureOpenAI
6
 
7
  from langchain_openai import AzureOpenAIEmbeddings
8
 
9
- from langchain_community.vectorstores import Chroma
10
  from langchain.retrievers import ContextualCompressionRetriever
11
  from langchain.retrievers.document_compressors import CrossEncoderReranker
12
  from langchain_community.cross_encoders import HuggingFaceCrossEncoder
@@ -38,7 +38,7 @@ vectorstore_persisted = Chroma(
38
 
39
  retriever = vectorstore_persisted.as_retriever(
40
  search_type='similarity',
41
- search_kwargs={'k': 20}
42
  )
43
 
44
  cross_encoder_model = HuggingFaceCrossEncoder(model_name="cross-encoder/ms-marco-MiniLM-L-6-v2")
@@ -160,4 +160,4 @@ demo = gr.Interface(
160
  )
161
 
162
  demo.queue()
163
- demo.launch()
 
6
 
7
  from langchain_openai import AzureOpenAIEmbeddings
8
 
9
+ from langchain_chroma import Chroma
10
  from langchain.retrievers import ContextualCompressionRetriever
11
  from langchain.retrievers.document_compressors import CrossEncoderReranker
12
  from langchain_community.cross_encoders import HuggingFaceCrossEncoder
 
38
 
39
  retriever = vectorstore_persisted.as_retriever(
40
  search_type='similarity',
41
+ search_kwargs={'k': 10}
42
  )
43
 
44
  cross_encoder_model = HuggingFaceCrossEncoder(model_name="cross-encoder/ms-marco-MiniLM-L-6-v2")
 
160
  )
161
 
162
  demo.queue()
163
+ demo.launch(auth=("demouser", os.getenv('PASSWD')))