AnanyaPathak commited on
Commit
69f3d2a
·
1 Parent(s): 334d228
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pinecone
2
+ import streamlit
3
+
4
+ index_id = "youtube-search"
5
+
6
+ pinecone.init(
7
+ api_key='e815acaa-c5d2-4280-85bc-4994c59a5ee4', # app.pinecone.io
8
+ environment="us-west1-gcp" # find next to API key
9
+ )
10
+ index = pinecone.Index(index_id)
11
+
12
+ query =
13
+
14
+ xq = model.encode(query).tolist()
15
+
16
+ index.query(xq, top_k=5, include_metadata=True)