Spaces:
Runtime error
Runtime error
remove the as float type
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ def main():
|
|
64 |
query_emb = model(query)#.astype(float)
|
65 |
|
66 |
#Compute dot score between query and all document embeddings
|
67 |
-
scores = util.dot_score(query_emb, doc_emb
|
68 |
|
69 |
#Combine docs & scores with other attributes
|
70 |
doc_score_pairs = list(zip(docs, scores, titles, start_times, end_times, locations))
|
|
|
64 |
query_emb = model(query)#.astype(float)
|
65 |
|
66 |
#Compute dot score between query and all document embeddings
|
67 |
+
scores = util.dot_score(query_emb, doc_emb)[0].cpu().tolist()
|
68 |
|
69 |
#Combine docs & scores with other attributes
|
70 |
doc_score_pairs = list(zip(docs, scores, titles, start_times, end_times, locations))
|