Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -61,12 +61,11 @@ def preprocess(query: str, k: int) -> tuple[str, str]:
|
|
61 |
tuple[str, str]: A tuple containing the prompt and references
|
62 |
"""
|
63 |
encoded_query = numpy.expand_dims(model.encode(query), axis=0)
|
64 |
-
print(query, encoded_query)
|
65 |
faiss.normalize_L2(encoded_query)
|
66 |
D, I = index.search(encoded_query, k)
|
67 |
top_five = data.loc[I[0]]
|
68 |
|
69 |
-
print(top_five)
|
70 |
|
71 |
prompt = (
|
72 |
"You are an AI assistant who delights in helping people learn about research from the IDETC Conference."
|
|
|
61 |
tuple[str, str]: A tuple containing the prompt and references
|
62 |
"""
|
63 |
encoded_query = numpy.expand_dims(model.encode(query), axis=0)
|
|
|
64 |
faiss.normalize_L2(encoded_query)
|
65 |
D, I = index.search(encoded_query, k)
|
66 |
top_five = data.loc[I[0]]
|
67 |
|
68 |
+
print(top_five["text"].values)
|
69 |
|
70 |
prompt = (
|
71 |
"You are an AI assistant who delights in helping people learn about research from the IDETC Conference."
|