HMPhuoc commited on
Commit
d36a83c
1 Parent(s): 49fb70a

change model and change for segmented data

Browse files
app.py CHANGED
@@ -10,6 +10,8 @@ from pathlib import Path
10
  import pandas as pd
11
  import plotly.express as px
12
 
 
 
13
  #Load tokenizer
14
  #fp = Path(__file__).with_name('tokenizer.pkl')
15
  with open('train/tokenizer/tokenizer.pkl',mode="rb") as f:
@@ -26,6 +28,7 @@ GRU_model = load_model('train/model/gru_model.h5')
26
 
27
  def tokenizer_pad(tokenizer,comment_text,max_length=200):
28
 
 
29
  comment_text = [comment_text]
30
  tokenized_text = tokenizer.texts_to_sequences(comment_text)
31
 
 
10
  import pandas as pd
11
  import plotly.express as px
12
 
13
+ from underthesea import word_tokenize
14
+
15
  #Load tokenizer
16
  #fp = Path(__file__).with_name('tokenizer.pkl')
17
  with open('train/tokenizer/tokenizer.pkl',mode="rb") as f:
 
28
 
29
  def tokenizer_pad(tokenizer,comment_text,max_length=200):
30
 
31
+ comment_text = word_tokenize(comment_text, format="text")
32
  comment_text = [comment_text]
33
  tokenized_text = tokenizer.texts_to_sequences(comment_text)
34
 
requirements.txt CHANGED
@@ -5,4 +5,5 @@ tensorflow
5
  numpy
6
  pathlib
7
  plotly
8
- pandas
 
 
5
  numpy
6
  pathlib
7
  plotly
8
+ pandas
9
+ underthesea
train/model/gru_model.h5 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:96033429be73138b6a17600a9b88940e7f378dc56eeada17792788fe416699f7
3
- size 242665448
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5ec54a3ff4cdd458ab651ca05774eb7f4f7e744046def14e9d176755a1a142a
3
+ size 244995280
train/model/lstm_model.h5 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:83f2080264aaf8caa00b382d9ddeeeb7cbc7c4b1a6d47c96b166d59f062a912a
3
- size 243514304
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f53c0db54bb35ec3649093abb0d0df3e40406003b16d83dc075e0c69127e8ed3
3
+ size 243514400
train/tokenizer/tokenizer.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f88a7dfdd45db0f08ce565aac2fcacb559c46198bb5f587c51aeb60f9f2e479d
3
- size 4583690
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddfc25d59703cbcb2d2267ff9a5ed142abf70bccd826b13b88952547308371ef
3
+ size 9146630