Spaces:
Sleeping
Sleeping
Commit
·
57eaca9
1
Parent(s):
4e652d8
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ loaded_model = ClassificationModel(
|
|
20 |
|
21 |
def predict_type(title_input):
|
22 |
title_input = title_input.lower()
|
23 |
-
title_input = re.sub(r'[-:‘’“”.%/()\[\]]', '', title_input)
|
24 |
title_input = sent_tokenize(title_input)
|
25 |
title_input = ' '.join(tokenizer.tokenize(' '.join(title_input)))
|
26 |
predictions, raw_outputs = loaded_model.predict([title_input])
|
|
|
20 |
|
21 |
def predict_type(title_input):
|
22 |
title_input = title_input.lower()
|
23 |
+
title_input = re.sub(r'[-:‘’“”.%/()\[\]\'"!]', '', title_input)
|
24 |
title_input = sent_tokenize(title_input)
|
25 |
title_input = ' '.join(tokenizer.tokenize(' '.join(title_input)))
|
26 |
predictions, raw_outputs = loaded_model.predict([title_input])
|