Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def search(query, k):
|
|
18 |
_, retrieved_examples = dataset.get_nearest_examples(
|
19 |
"embeddings",
|
20 |
query_embedding,
|
21 |
-
k=k,
|
22 |
)
|
23 |
results = []
|
24 |
for text, start, end, title, url in zip(
|
@@ -42,7 +42,7 @@ iface = gr.Interface(
|
|
42 |
search,
|
43 |
inputs=[
|
44 |
gr.inputs.Textbox(label="Query"),
|
45 |
-
gr.inputs.Number(label="K", default=
|
46 |
],
|
47 |
outputs=[
|
48 |
gr.outputs.Textbox(label="Title"),
|
|
|
18 |
_, retrieved_examples = dataset.get_nearest_examples(
|
19 |
"embeddings",
|
20 |
query_embedding,
|
21 |
+
k=int(k),
|
22 |
)
|
23 |
results = []
|
24 |
for text, start, end, title, url in zip(
|
|
|
42 |
search,
|
43 |
inputs=[
|
44 |
gr.inputs.Textbox(label="Query"),
|
45 |
+
gr.inputs.Number(label="K", default=3),
|
46 |
],
|
47 |
outputs=[
|
48 |
gr.outputs.Textbox(label="Title"),
|