Spaces:
Sleeping
Sleeping
Add gensim and Word2vec/nlpl_43 hf model
Browse files- app.py +6 -2
- requirements.txt +2 -0
app.py
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
import streamlit as st
|
|
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
1 |
import streamlit as st
|
2 |
+
from gensim.models import KeyedVectors
|
3 |
+
from huggingface_hub import hf_hub_download
|
4 |
+
model = KeyedVectors.load_word2vec_format(hf_hub_download(repo_id="Word2vec/nlpl_43", filename="model.bin"), binary=True, unicode_errors="ignore")
|
5 |
|
6 |
+
word = st.text_input('Enter a word')
|
7 |
+
|
8 |
+
st.write(word, 'squared is', word)
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
gensim
|
2 |
+
from huggingface_hub import hf_hub_download
|