Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,8 @@ model = BERTBaseUncased()
|
|
| 18 |
model.load_state_dict(torch.load(config.MODEL_PATH, map_location=torch.device(device)),strict=False)
|
| 19 |
model.to(device)
|
| 20 |
|
| 21 |
-
|
|
|
|
| 22 |
|
| 23 |
# text_processor = TextPreProcessor(
|
| 24 |
# # terms that will be normalized
|
|
@@ -48,9 +49,8 @@ model.to(device)
|
|
| 48 |
# dicts=[]
|
| 49 |
# )
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
social_tokenizer=SocialTokenizer(lowercase=True).tokenize,
|
| 54 |
|
| 55 |
def preprocess(text):
|
| 56 |
# tokens = T.tokenize(text)
|
|
|
|
| 18 |
model.load_state_dict(torch.load(config.MODEL_PATH, map_location=torch.device(device)),strict=False)
|
| 19 |
model.to(device)
|
| 20 |
|
| 21 |
+
# T = tokenizer.TweetTokenizer(
|
| 22 |
+
# preserve_handles=True, preserve_hashes=True, preserve_case=False, preserve_url=False)
|
| 23 |
|
| 24 |
# text_processor = TextPreProcessor(
|
| 25 |
# # terms that will be normalized
|
|
|
|
| 49 |
# dicts=[]
|
| 50 |
# )
|
| 51 |
|
| 52 |
+
|
| 53 |
+
social_tokenizer=SocialTokenizer(lowercase=True).tokenize
|
|
|
|
| 54 |
|
| 55 |
def preprocess(text):
|
| 56 |
# tokens = T.tokenize(text)
|