breddaz commited on
Commit
2699b34
·
1 Parent(s): 988c65e

Add gensim and Word2vec/nlpl_43 hf model

Browse files
Files changed (2) hide show
  1. app.py +6 -2
  2. requirements.txt +2 -0
app.py CHANGED
@@ -1,4 +1,8 @@
1
  import streamlit as st
 
 
 
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
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