seansullivan commited on
Commit
2e7ed44
·
verified ·
1 Parent(s): c4b286a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -25,10 +25,15 @@ model_name = "claude-3-haiku-20240307"
25
 
26
  namespace_name = st.sidebar.selectbox("Choose a Website", ("Langchain", "Apify", "HiperGator", "Crawlee", "QDRANT", "Supabase", "Zapier"))
27
 
 
 
28
  namespace_name2 = st.sidebar.selectbox("Choose a Website", ("","Langchain","Apify", "HiperGator", "Crawlee", "QDRANT", "Supabase", "Zapier"))
29
 
 
 
30
  namespace_name3 = st.sidebar.selectbox("Choose a Website", ("","Langchain","Apify", "Crawlee", "QDRANT", "Supabase", "Zapier"))
31
 
 
32
 
33
  # ========== PART 1 ==========
34
  OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
@@ -52,13 +57,13 @@ index = pc.Index(index_name)
52
 
53
  splade_encoder = SpladeEncoder()
54
  retriever1 = PineconeHybridSearchRetriever(
55
- embeddings=embed, sparse_encoder=splade_encoder, index=index, namespace=namespace_name, top_k=2
56
  )
57
  retriever2 = PineconeHybridSearchRetriever(
58
- embeddings=embed, sparse_encoder=splade_encoder, index=index, namespace=namespace_name2, top_k=2
59
  )
60
  retriever3 = PineconeHybridSearchRetriever(
61
- embeddings=embed, sparse_encoder=splade_encoder, index=index, namespace=namespace_name3, top_k=2
62
  )
63
 
64
  retriever = EnsembleRetriever(
 
25
 
26
  namespace_name = st.sidebar.selectbox("Choose a Website", ("Langchain", "Apify", "HiperGator", "Crawlee", "QDRANT", "Supabase", "Zapier"))
27
 
28
+ value = st.sidebar.slider('Pages to retrieve', min_value=1.0, max_value=4.0, step=1.0)
29
+
30
  namespace_name2 = st.sidebar.selectbox("Choose a Website", ("","Langchain","Apify", "HiperGator", "Crawlee", "QDRANT", "Supabase", "Zapier"))
31
 
32
+ value2 = st.sidebar.slider('Pages to retrieve', min_value=1.0, max_value=4.0, step=1.0, key='website2')
33
+
34
  namespace_name3 = st.sidebar.selectbox("Choose a Website", ("","Langchain","Apify", "Crawlee", "QDRANT", "Supabase", "Zapier"))
35
 
36
+ value3 = st.sidebar.slider('Pages to retrieve', min_value=1.0, max_value=4.0, step=1.0, key='website3')
37
 
38
  # ========== PART 1 ==========
39
  OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
 
57
 
58
  splade_encoder = SpladeEncoder()
59
  retriever1 = PineconeHybridSearchRetriever(
60
+ embeddings=embed, sparse_encoder=splade_encoder, index=index, namespace=namespace_name, top_k=value
61
  )
62
  retriever2 = PineconeHybridSearchRetriever(
63
+ embeddings=embed, sparse_encoder=splade_encoder, index=index, namespace=namespace_name2, top_k=value2
64
  )
65
  retriever3 = PineconeHybridSearchRetriever(
66
+ embeddings=embed, sparse_encoder=splade_encoder, index=index, namespace=namespace_name3, top_k=value3
67
  )
68
 
69
  retriever = EnsembleRetriever(