ArtMirror2000 commited on
Commit
43fda7e
1 Parent(s): 6c7a19a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import fasttext
3
+ import fasttext.util
4
+
5
+ def getVectors(fname):
6
+ data = {}
7
+ data[tokens[0]] = ft.get_nearest_neighbors(fname)
8
+ return data
9
+
10
+ interface = gr.Interface(fn = getVectors,
11
+ inputs = "text",
12
+ outputs = ['text'],
13
+ title = 'get vectors',
14
+ description = 'get vectors for search')
15
+
16
+ interface.launch(inline = False)