Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -103,11 +103,11 @@ def extracted_query_embeddings(queries, max_length=64):
|
|
103 |
return_token_type_ids=True
|
104 |
)
|
105 |
|
106 |
-
query_embeddings = query_encoder.predict([np.array(query_inputs['input_ids']),
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
return query_embeddings
|
112 |
|
113 |
#Wikipedia API:
|
|
|
103 |
return_token_type_ids=True
|
104 |
)
|
105 |
|
106 |
+
query_embeddings = query_encoder.predict([np.array(query_inputs['input_ids']),
|
107 |
+
np.array(query_inputs['attention_mask']),
|
108 |
+
np.array(query_inputs['token_type_ids'])],
|
109 |
+
batch_size=1,
|
110 |
+
verbose=1)
|
111 |
return query_embeddings
|
112 |
|
113 |
#Wikipedia API:
|