Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,8 @@ def clean_words(words):
|
|
31 |
clean_dict[word] = round(score, 2)
|
32 |
return clean_dict
|
33 |
|
34 |
-
path = "cc.
|
|
|
35 |
m = KeyedVectors.load_word2vec_format(path, limit = 10000)
|
36 |
|
37 |
def on_submit(text, mode):
|
@@ -46,7 +47,7 @@ def on_submit(text, mode):
|
|
46 |
iface = gr.Interface(
|
47 |
fn=on_submit,
|
48 |
inputs=[
|
49 |
-
grinputs.Textbox(placeholder='
|
50 |
grinputs.Radio(['Close', 'Far'], label="Close of Far mode")],
|
51 |
outputs=[
|
52 |
groutputs.Textbox(label='Information')],
|
|
|
31 |
clean_dict[word] = round(score, 2)
|
32 |
return clean_dict
|
33 |
|
34 |
+
path = "cc.en.300.vec"
|
35 |
+
# path = "cc.fr.300.vec"
|
36 |
m = KeyedVectors.load_word2vec_format(path, limit = 10000)
|
37 |
|
38 |
def on_submit(text, mode):
|
|
|
47 |
iface = gr.Interface(
|
48 |
fn=on_submit,
|
49 |
inputs=[
|
50 |
+
grinputs.Textbox(placeholder='word1, word2, word3, ...', label="Input words (coma separated). Returns words that are close (or far) from the input words."),
|
51 |
grinputs.Radio(['Close', 'Far'], label="Close of Far mode")],
|
52 |
outputs=[
|
53 |
groutputs.Textbox(label='Information')],
|