Preethamreddy799 commited on
Commit
3c1a020
·
1 Parent(s): b33d37d

new update

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -42,9 +42,9 @@ def preprocess_text(input_text, word2vec_model):
42
 
43
  # Load Word2Vec model
44
  def load_word2vec_model():
45
- word2vec_path = '/Users/preethamreddygollapalli/Downloads/word2vec_model.bin'
46
- if not os.path.exists(word2vec_path):
47
- raise FileNotFoundError(f"Word2Vec model file not found at {word2vec_path}")
48
  return gensim.models.Word2Vec.load(word2vec_path)
49
 
50
  # Load LSTM model
 
42
 
43
  # Load Word2Vec model
44
  def load_word2vec_model():
45
+ repo_id = 'Preethamreddy799/NLP_MODEL'
46
+ filename = 'word2vec_model.bin'
47
+ word2vec_path = hf_hub_download(repo_id=repo_id, filename=filename)
48
  return gensim.models.Word2Vec.load(word2vec_path)
49
 
50
  # Load LSTM model