Spaces:
Running
on
Zero
Running
on
Zero
suwonpabby
commited on
Commit
•
dfe5753
1
Parent(s):
3453f97
Modify
Browse files
app.py
CHANGED
@@ -185,12 +185,9 @@ def make_gen(QA, candidates, top_k, character_type):
|
|
185 |
query_embeddings = embedding_model.encode([rag_prompt],
|
186 |
batch_size=1,
|
187 |
max_length=8192,
|
188 |
-
)
|
189 |
key_embeddings = embedding_model.encode(candidates)["dense_vecs"]
|
190 |
|
191 |
-
print("candidates:", candidates)
|
192 |
-
print(f"query_embeddings type: {type(query_embeddings)}, shape: {query_embeddings.shape}")
|
193 |
-
print(f"key_embeddings type: {type(key_embeddings)}, shape: {key_embeddings.shape}")
|
194 |
|
195 |
|
196 |
similarity = query_embeddings @ key_embeddings.T
|
|
|
185 |
query_embeddings = embedding_model.encode([rag_prompt],
|
186 |
batch_size=1,
|
187 |
max_length=8192,
|
188 |
+
)["dense_vecs"]
|
189 |
key_embeddings = embedding_model.encode(candidates)["dense_vecs"]
|
190 |
|
|
|
|
|
|
|
191 |
|
192 |
|
193 |
similarity = query_embeddings @ key_embeddings.T
|