error fixed?
Browse files- App/Embedding/utils/Initialize.py +9 -9
- App/app.py +1 -1
App/Embedding/utils/Initialize.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
from langchain.embeddings import HuggingFaceEmbeddings
|
2 |
from langchain.docstore.document import Document
|
3 |
-
from langchain.vectorstores import Pinecone
|
4 |
import os
|
5 |
-
import pinecone
|
6 |
|
7 |
index_name = "movie-recommender-fast"
|
8 |
model_name = "thenlper/gte-base"
|
@@ -10,15 +10,15 @@ embeddings = HuggingFaceEmbeddings(model_name=model_name)
|
|
10 |
|
11 |
|
12 |
# get api key from app.pinecone.io
|
13 |
-
PINECONE_API_KEY = (
|
14 |
-
|
15 |
-
)
|
16 |
-
# find your environment next to the api key in pinecone console
|
17 |
-
PINECONE_ENV = os.environ.get("PINECONE_ENVIRONMENT") or "us-west4-gcp-free"
|
18 |
|
19 |
-
pinecone.init(api_key=PINECONE_API_KEY, environment=PINECONE_ENV)
|
20 |
|
21 |
-
docsearch = Pinecone.from_existing_index(index_name, embeddings)
|
22 |
|
23 |
|
24 |
def generateChunks(chunks, task_id, n=100):
|
|
|
1 |
from langchain.embeddings import HuggingFaceEmbeddings
|
2 |
from langchain.docstore.document import Document
|
3 |
+
# from langchain.vectorstores import Pinecone
|
4 |
import os
|
5 |
+
# import pinecone
|
6 |
|
7 |
index_name = "movie-recommender-fast"
|
8 |
model_name = "thenlper/gte-base"
|
|
|
10 |
|
11 |
|
12 |
# get api key from app.pinecone.io
|
13 |
+
# PINECONE_API_KEY = (
|
14 |
+
# os.environ.get("PINECONE_API_KEY") or "0712a5e4-bcf3-4152-a726-27ee3a2676bb"
|
15 |
+
# )
|
16 |
+
# # find your environment next to the api key in pinecone console
|
17 |
+
# PINECONE_ENV = os.environ.get("PINECONE_ENVIRONMENT") or "us-west4-gcp-free"
|
18 |
|
19 |
+
# pinecone.init(api_key=PINECONE_API_KEY, environment=PINECONE_ENV)
|
20 |
|
21 |
+
# docsearch = Pinecone.from_existing_index(index_name, embeddings)
|
22 |
|
23 |
|
24 |
def generateChunks(chunks, task_id, n=100):
|
App/app.py
CHANGED
@@ -87,4 +87,4 @@ app.include_router(streaming_router)
|
|
87 |
app.include_router(monitor_router)
|
88 |
app.include_router(user_transcriptions_router)
|
89 |
# app.include_router(embeddigs_router)
|
90 |
-
app.include_router(chat_router)
|
|
|
87 |
app.include_router(monitor_router)
|
88 |
app.include_router(user_transcriptions_router)
|
89 |
# app.include_router(embeddigs_router)
|
90 |
+
# app.include_router(chat_router)
|