Spaces:
Sleeping
Sleeping
Update helper.py
Browse files
helper.py
CHANGED
|
@@ -10,7 +10,7 @@ nltk.download('stopwords')
|
|
| 10 |
stop_words = set(stopwords.words('english'))
|
| 11 |
|
| 12 |
def load_vectorizer():
|
| 13 |
-
from_disk = pickle.load(open("
|
| 14 |
new_v = TextVectorization.from_config(from_disk['config'])
|
| 15 |
# You have to call `adapt` with some dummy data (BUG in Keras)
|
| 16 |
new_v.adapt(tf.data.Dataset.from_tensor_slices(["xyz"]))
|
|
|
|
| 10 |
stop_words = set(stopwords.words('english'))
|
| 11 |
|
| 12 |
def load_vectorizer():
|
| 13 |
+
from_disk = pickle.load(open("tv_layer.pkl", "rb"))
|
| 14 |
new_v = TextVectorization.from_config(from_disk['config'])
|
| 15 |
# You have to call `adapt` with some dummy data (BUG in Keras)
|
| 16 |
new_v.adapt(tf.data.Dataset.from_tensor_slices(["xyz"]))
|