Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -39,18 +39,15 @@ def get_context(vectorstore,query):
|
|
39 |
|
40 |
return context_retrieved
|
41 |
|
42 |
-
# first we create the chunks for
|
43 |
chunks = process_giz_worldwide()
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
temp_doc = create_documents(temp_df,'chunks')
|
48 |
-
for i in range(5):
|
49 |
-
print(i,"\n",temp_doc[i])
|
50 |
hybrid_embed_chunks(docs= temp_doc, collection_name = "giz_worldwide")
|
51 |
|
52 |
|
53 |
-
print("
|
54 |
|
55 |
# once the chunks are done, we perform hybrid emebddings
|
56 |
#embed_chunks(chunks)
|
|
|
39 |
|
40 |
return context_retrieved
|
41 |
|
42 |
+
# first we process and create the chunks for relvant data source
|
43 |
chunks = process_giz_worldwide()
|
44 |
+
# we convert to langchain documents
|
45 |
+
temp_doc = create_documents(chunks,'chunks')
|
46 |
+
# embed and store docs
|
|
|
|
|
|
|
47 |
hybrid_embed_chunks(docs= temp_doc, collection_name = "giz_worldwide")
|
48 |
|
49 |
|
50 |
+
print("embedding done")
|
51 |
|
52 |
# once the chunks are done, we perform hybrid emebddings
|
53 |
#embed_chunks(chunks)
|