Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,6 @@ import spacy
|
|
4 |
# from spacy.lang.en import English
|
5 |
# from utils import spacy_function, make_predictions, example_input
|
6 |
|
7 |
-
import sys
|
8 |
-
sys.path.insert(1, 'PyTorch')
|
9 |
from Dataset import SkimlitDataset
|
10 |
from Embeddings import get_embeddings
|
11 |
from Model import SkimlitModel
|
@@ -14,10 +12,10 @@ from LabelEncoder import LabelEncoder
|
|
14 |
from MakePredictions import make_skimlit_predictions
|
15 |
from RandomAbstract import Choose_Random_text
|
16 |
|
17 |
-
MODEL_PATH = '
|
18 |
-
TOKENIZER_PATH = '
|
19 |
-
LABEL_ENOCDER_PATH = "
|
20 |
-
EMBEDDING_FILE_PATH = '
|
21 |
|
22 |
@st.cache()
|
23 |
def create_utils(model_path, tokenizer_path, label_encoder_path, embedding_file_path):
|
|
|
4 |
# from spacy.lang.en import English
|
5 |
# from utils import spacy_function, make_predictions, example_input
|
6 |
|
|
|
|
|
7 |
from Dataset import SkimlitDataset
|
8 |
from Embeddings import get_embeddings
|
9 |
from Model import SkimlitModel
|
|
|
12 |
from MakePredictions import make_skimlit_predictions
|
13 |
from RandomAbstract import Choose_Random_text
|
14 |
|
15 |
+
MODEL_PATH = 'skimlit-model-final-1.pt'
|
16 |
+
TOKENIZER_PATH = 'tokenizer.json'
|
17 |
+
LABEL_ENOCDER_PATH = "label_encoder.json"
|
18 |
+
EMBEDDING_FILE_PATH = 'glove.6B.300d.txt'
|
19 |
|
20 |
@st.cache()
|
21 |
def create_utils(model_path, tokenizer_path, label_encoder_path, embedding_file_path):
|