Spaces:
Build error
Build error
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -65,8 +65,7 @@ from functools import reduce
|
|
| 65 |
from youtube_transcript_api import YouTubeTranscriptApi
|
| 66 |
from youtube_transcript_api._errors import TranscriptsDisabled, VideoUnavailable
|
| 67 |
import faiss
|
| 68 |
-
|
| 69 |
-
from langchain.embeddings import BERTEmbeddings
|
| 70 |
from langchain.schema import Document
|
| 71 |
|
| 72 |
|
|
@@ -420,7 +419,7 @@ docs = [
|
|
| 420 |
texts = [doc.page_content for doc in docs]
|
| 421 |
|
| 422 |
# Initialize the embedding model
|
| 423 |
-
embedding_model =
|
| 424 |
|
| 425 |
embeddings = [embedding_model.embed_query(text) for text in texts]
|
| 426 |
|
|
|
|
| 65 |
from youtube_transcript_api import YouTubeTranscriptApi
|
| 66 |
from youtube_transcript_api._errors import TranscriptsDisabled, VideoUnavailable
|
| 67 |
import faiss
|
| 68 |
+
|
|
|
|
| 69 |
from langchain.schema import Document
|
| 70 |
|
| 71 |
|
|
|
|
| 419 |
texts = [doc.page_content for doc in docs]
|
| 420 |
|
| 421 |
# Initialize the embedding model
|
| 422 |
+
embedding_model = HuggingFaceEmbeddings(model_name="bert-base-uncased")
|
| 423 |
|
| 424 |
embeddings = [embedding_model.embed_query(text) for text in texts]
|
| 425 |
|