Update app.py
Browse files
app.py
CHANGED
@@ -9,20 +9,17 @@ import pandas as pd
|
|
9 |
import os
|
10 |
|
11 |
from huggingface_hub import HfFileSystem
|
12 |
-
token = os.getenv('
|
13 |
|
14 |
st.write(token)
|
15 |
|
16 |
-
fs = HfFileSystem(token=
|
17 |
|
18 |
import time
|
19 |
|
20 |
|
21 |
-
api_key=
|
22 |
|
23 |
-
os.environ["OPENAI_API_KEY"] = api_key
|
24 |
-
|
25 |
-
os.environ.get("OPENAI_API_KEY")
|
26 |
|
27 |
bi_encoder = SentenceTransformer('msmarco-distilbert-base-v4')
|
28 |
bi_encoder.max_seq_length = 256 # Truncate long documents to 256 tokens
|
@@ -30,7 +27,7 @@ bi_encoder.max_seq_length = 256 # Truncate long documents to 256 tokens
|
|
30 |
# Store the index as a variable
|
31 |
INDEX_NAME = 'cl-search-idx'
|
32 |
|
33 |
-
pc_api_key=
|
34 |
pc = Pinecone(api_key=pc_api_key)
|
35 |
index = pc.Index(name=INDEX_NAME)
|
36 |
|
|
|
9 |
import os
|
10 |
|
11 |
from huggingface_hub import HfFileSystem
|
12 |
+
token = os.getenv('FILE_TOKEN')
|
13 |
|
14 |
st.write(token)
|
15 |
|
16 |
+
fs = HfFileSystem(token=token)
|
17 |
|
18 |
import time
|
19 |
|
20 |
|
21 |
+
api_key=os.environ["OPENAI_API_KEY"]
|
22 |
|
|
|
|
|
|
|
23 |
|
24 |
bi_encoder = SentenceTransformer('msmarco-distilbert-base-v4')
|
25 |
bi_encoder.max_seq_length = 256 # Truncate long documents to 256 tokens
|
|
|
27 |
# Store the index as a variable
|
28 |
INDEX_NAME = 'cl-search-idx'
|
29 |
|
30 |
+
pc_api_key= os.environ["clpine"] #AWS
|
31 |
pc = Pinecone(api_key=pc_api_key)
|
32 |
index = pc.Index(name=INDEX_NAME)
|
33 |
|