Yoxas commited on
Commit
317cb02
·
verified ·
1 Parent(s): 10c14f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,10 +10,10 @@ device = 'cuda' if torch.cuda.is_available() else 'cpu'
10
 
11
  # Load the CSV file with embeddings
12
  df = pd.read_csv('RBDx10kstats.csv')
13
- df['embedding'] = df['embedding'].apply(json.loads) # Convert JSON string back to list
14
 
15
  # Convert embeddings to tensor for efficient retrieval
16
- embeddings = torch.tensor(df['embedding'].tolist(), device=device)
17
 
18
  # Load the Sentence Transformer model
19
  model = SentenceTransformer('all-MiniLM-L6-v2', device=device)
 
10
 
11
  # Load the CSV file with embeddings
12
  df = pd.read_csv('RBDx10kstats.csv')
13
+ df['Abstract'] = df['Abstract'].apply(json.loads) # Convert JSON string back to list
14
 
15
  # Convert embeddings to tensor for efficient retrieval
16
+ embeddings = torch.tensor(df['Abstract'].tolist(), device=device)
17
 
18
  # Load the Sentence Transformer model
19
  model = SentenceTransformer('all-MiniLM-L6-v2', device=device)