madoss commited on
Commit
d69bc63
1 Parent(s): 5c428bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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=int(3)),
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"),