christopher commited on
Commit
072e8cc
Β·
1 Parent(s): 9fa01fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -43,8 +43,9 @@ def search(token_to_lookup, num_neighbors=500):
43
  iface = gr.Interface(
44
  fn=search,
45
 
46
- #inputs=[gr.Textbox(lines=1, label="Vocabulary Token", placeholder="Enter token..."), gr.Number(value=50, label="number of neighbors")],
47
- inputs=gr.Textbox(lines=1, label="Vocabulary Token", placeholder="Enter token..."),
 
48
  outputs=[gr.Textbox(label="IP-Nearest tokens"), gr.Textbox(label="IP-Nearest subwords"), gr.Textbox(label="L2-Nearest tokens"), gr.Textbox(label="L2-Nearest subwords")],
49
  examples=[
50
  ["##logy"],
 
43
  iface = gr.Interface(
44
  fn=search,
45
 
46
+ inputs=[gr.Textbox(lines=1, label="Vocabulary Token", placeholder="Enter token..."),
47
+ gr.Slider(minimum=0, maximum=1000, value=250, step=10,label="number of neighbors")],
48
+ #inputs=gr.Textbox(lines=1, label="Vocabulary Token", placeholder="Enter token..."),
49
  outputs=[gr.Textbox(label="IP-Nearest tokens"), gr.Textbox(label="IP-Nearest subwords"), gr.Textbox(label="L2-Nearest tokens"), gr.Textbox(label="L2-Nearest subwords")],
50
  examples=[
51
  ["##logy"],