Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import streamlit as st
|
2 |
-
from functions_preprocess import LinguisticPreprocessor, download_if_non_existent
|
3 |
import pickle
|
4 |
import nltk
|
5 |
nltk.download('stopwords')
|
@@ -22,6 +22,7 @@ def load_model():
|
|
22 |
return model
|
23 |
|
24 |
def load_cnn():
|
|
|
25 |
model.load_state_dict(torch.load('model_cnn.pkl'))
|
26 |
model.eval()
|
27 |
|
|
|
1 |
import streamlit as st
|
2 |
+
from functions_preprocess import LinguisticPreprocessor, download_if_non_existent, CNN
|
3 |
import pickle
|
4 |
import nltk
|
5 |
nltk.download('stopwords')
|
|
|
22 |
return model
|
23 |
|
24 |
def load_cnn():
|
25 |
+
model = CNN(len(vocab), 300, 128, [3, 8], 0.5, 2)
|
26 |
model.load_state_dict(torch.load('model_cnn.pkl'))
|
27 |
model.eval()
|
28 |
|