Spaces:
Runtime error
Runtime error
added the float type
Browse files
app.py
CHANGED
@@ -61,10 +61,10 @@ def main():
|
|
61 |
#st.text_area('Text area')
|
62 |
#age = st.number_input("Age in Years")
|
63 |
#Encode query and documents
|
64 |
-
query_emb = model(query)
|
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))
|
|
|
61 |
#st.text_area('Text area')
|
62 |
#age = st.number_input("Age in Years")
|
63 |
#Encode query and documents
|
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.astype(float))[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))
|