Spaces:
Runtime error
Runtime error
10zinten
commited on
Commit
•
ae4c24d
1
Parent(s):
57c0246
add literary_bo+esukhia_katen wordvectors
Browse files
.gitattributes
CHANGED
@@ -27,3 +27,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
28 |
*.wordvectors filter=lfs diff=lfs merge=lfs -text
|
29 |
classical_bo.wordvectors.vectors.npy filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
28 |
*.wordvectors filter=lfs diff=lfs merge=lfs -text
|
29 |
classical_bo.wordvectors.vectors.npy filter=lfs diff=lfs merge=lfs -text
|
30 |
+
word2vec.wordvectors.vectors.npy filter=lfs diff=lfs merge=lfs -text
|
31 |
+
word2vec.wordvectorr filter=lfs diff=lfs merge=lfs -text
|
32 |
+
word2vec.wordvectors filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from gensim.models import KeyedVectors
|
2 |
import gradio as gr
|
3 |
|
4 |
-
word_vectors_path = "
|
5 |
wv = KeyedVectors.load(str(word_vectors_path), mmap='r')
|
6 |
|
7 |
def format_to_html(sim_output):
|
@@ -38,9 +38,9 @@ def find_similarity(wordA, wordB):
|
|
38 |
return max([float(sim), 0.0])
|
39 |
|
40 |
title = "Word Similarity With Literary Word2Vec"
|
41 |
-
examples = ["
|
42 |
|
43 |
-
assert isinstance(find_similarity(examples[0], examples[1]), float)
|
44 |
assert isinstance(find_similarity("ར་", "B"), str)
|
45 |
|
46 |
demo = gr.Interface(
|
@@ -48,7 +48,7 @@ demo = gr.Interface(
|
|
48 |
inputs=[gr.inputs.Textbox("Word A"), gr.inputs.Textbox("Word B")],
|
49 |
outputs="text",
|
50 |
title=title,
|
51 |
-
|
52 |
).launch()
|
53 |
|
54 |
# demo = gr.Blocks()
|
1 |
from gensim.models import KeyedVectors
|
2 |
import gradio as gr
|
3 |
|
4 |
+
word_vectors_path = "word2vec.wordvectors"
|
5 |
wv = KeyedVectors.load(str(word_vectors_path), mmap='r')
|
6 |
|
7 |
def format_to_html(sim_output):
|
38 |
return max([float(sim), 0.0])
|
39 |
|
40 |
title = "Word Similarity With Literary Word2Vec"
|
41 |
+
examples = [["བླ་མ་", "སློབ་མ་"], ["སྟོབས་", "ཤུགས་"]]
|
42 |
|
43 |
+
assert isinstance(find_similarity(examples[0][1], examples[0][1]), float)
|
44 |
assert isinstance(find_similarity("ར་", "B"), str)
|
45 |
|
46 |
demo = gr.Interface(
|
48 |
inputs=[gr.inputs.Textbox("Word A"), gr.inputs.Textbox("Word B")],
|
49 |
outputs="text",
|
50 |
title=title,
|
51 |
+
examples=examples
|
52 |
).launch()
|
53 |
|
54 |
# demo = gr.Blocks()
|
classical_bo.wordvectors → word2vec.wordvectors
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8849ebf43aed6ee87555dc789607dcb678030c3ec109b585e00941aa592df6ab
|
3 |
+
size 10307724
|
classical_bo.wordvectors.vectors.npy → word2vec.wordvectors.vectors.npy
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:57536a58a006f8a858b50a75a64f6f0431688b2d6939999fbd40cbe2ed8eb7dc
|
3 |
+
size 76451728
|