Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,7 @@ import os
|
|
8 |
import faiss
|
9 |
|
10 |
# Set up SentenceTransformer
|
11 |
-
model = SentenceTransformer('
|
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(
|
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 |
|