ibn-sidah-team commited on
Commit
c5c0a56
1 Parent(s): 3958617

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -1,10 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import sensegram
2
  from wsd import WSD
3
  from gensim.models import KeyedVectors
4
 
5
  # Model files
6
- sense_vectors_fpath = "best_model.sense_vectors"
7
- word_vectors_fpath = "best_model.word_vectors"
8
 
9
  # Model parameters
10
  max_context_words = 3
 
1
+ python -m venv .senseenv
2
+ # Activate the virtual environment
3
+ source .senseenv/bin/activate
4
+ # Deactivate the virtual environment
5
+ source .senseenv/bin/deactivate
6
+
7
+
8
+ pip install -r requirements.txt
9
+ pip install faiss-cpu
10
+ # In the requirements.txt but not installed correctly so we have to use pip command
11
+ #!pip install gensim==3.8.1
12
+ python -m spacy download en_core_web_sm
13
+ # Install gradio for user interface
14
+ pip install gradio
15
+
16
  import sensegram
17
  from wsd import WSD
18
  from gensim.models import KeyedVectors
19
 
20
  # Model files
21
+ sense_vectors_fpath = "./best_sense_gram_model/best_model.sense_vectors"
22
+ word_vectors_fpath = "./best_sense_gram_model/best_model.word_vectors"
23
 
24
  # Model parameters
25
  max_context_words = 3