by Anonymous » 21 Mar 2025, 00:19
Code: Select all
vec_multi = embedding.embed_documents(pdf_chunks)
import numpy as np
vec_np = np.array(vec_multi)
print(vec_np.shape) # (문장 개수, 임베딩 차원)
print(vec_np.dtype)
(2119, 768)
float64
embedding_model_name = "jhgan/ko-sbert-nli" # 임베딩 모델 선택
embedding = HuggingFaceEmbeddings(model_name=embedding_model_name)
---> pdf_vector_store = FAISS.from_texts(pdf_chunks, embedding=embedding)
ValueError: input not a numpy array
Ich überprüfe, dass PDF_Chunks Numpy Array ist, aber es machte einen solchen Fehler
Ich weiß nicht, was das
Problem ist, und ich weiß nicht, wie ich es lösen soll.
[code]vec_multi = embedding.embed_documents(pdf_chunks)
import numpy as np
vec_np = np.array(vec_multi)
print(vec_np.shape) # (문장 개수, 임베딩 차원)
print(vec_np.dtype)
(2119, 768)
float64
embedding_model_name = "jhgan/ko-sbert-nli" # 임베딩 모델 선택
embedding = HuggingFaceEmbeddings(model_name=embedding_model_name)
---> pdf_vector_store = FAISS.from_texts(pdf_chunks, embedding=embedding)
ValueError: input not a numpy array
[/code]
[b] Ich überprüfe, dass PDF_Chunks Numpy Array ist, aber es machte einen solchen Fehler [/b]
Ich weiß nicht, was das [url=viewtopic.php?t=18916]Problem[/url] ist, und ich weiß nicht, wie ich es lösen soll.