Bilalst commited on
Commit
4b4a2b4
1 Parent(s): 90d5de6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -8,8 +8,7 @@ import os
8
  import faiss
9
 
10
  # Set up SentenceTransformer
11
- model = SentenceTransformer('all-mpnet-base-v2')
12
-
13
 
14
 
15
  playlist_id = 'PLD4EAA8F8C9148A1B'
@@ -53,8 +52,7 @@ for video_id in video_ids:
53
  sentence_embeddings = model.encode(transcripts)
54
 
55
  # Set up FAISS
56
- index = faiss.IndexFlatL2(768) # Create an index with L2 distance
57
-
58
  # Convert list of embeddings to NumPy array
59
  sentence_embeddings = np.array(sentence_embeddings)
60
 
 
8
  import faiss
9
 
10
  # Set up SentenceTransformer
11
+ model = SentenceTransformer('paraphrase-MiniLM-L6-v2')
 
12
 
13
 
14
  playlist_id = 'PLD4EAA8F8C9148A1B'
 
52
  sentence_embeddings = model.encode(transcripts)
53
 
54
  # Set up FAISS
55
+ index = faiss.IndexFlatL2(384)
 
56
  # Convert list of embeddings to NumPy array
57
  sentence_embeddings = np.array(sentence_embeddings)
58