Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,11 +6,12 @@ from splade.models.transformer_rep import Splade
|
|
6 |
from transformers import AutoTokenizer
|
7 |
from datasets import load_dataset
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
)
|
13 |
-
index =
|
|
|
14 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
15 |
# check device being run on
|
16 |
if device != 'cuda':
|
|
|
6 |
from transformers import AutoTokenizer
|
7 |
from datasets import load_dataset
|
8 |
|
9 |
+
import os
|
10 |
+
from pinecone import Pinecone
|
11 |
+
os.environ['PINECONE_API_KEY'] = '884344f6-d820-4bc8-9edf-4157373df452'
|
12 |
+
pc = Pinecone(api_key=os.environ.get('PINECONE_API_KEY'))
|
13 |
+
index = pc.Index('pubmed-splade')
|
14 |
+
|
15 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
16 |
# check device being run on
|
17 |
if device != 'cuda':
|