Spaces:
Sleeping
Sleeping
SuperBigtoo
commited on
Commit
·
df74a6d
1
Parent(s):
e04d29a
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'[
|
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])
|