fvelasco
commited on
Commit
·
c3eabb9
1
Parent(s):
2ce2556
changing postproc
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ model.to(device)
|
|
18 |
|
19 |
|
20 |
|
21 |
-
def postproc(
|
22 |
try:
|
23 |
preds = preds.replace('De el', 'Del').replace('de el', 'del').replace(' ', ' ')
|
24 |
if preds[0].islower():
|
@@ -27,7 +27,7 @@ def postproc(input, preds):
|
|
27 |
|
28 |
# Nombres en mayusculas
|
29 |
prev_letter = ''
|
30 |
-
for word in
|
31 |
if word:
|
32 |
if word[0].isupper():
|
33 |
if word.lower() in preds:
|
|
|
18 |
|
19 |
|
20 |
|
21 |
+
def postproc(input_sentence, preds):
|
22 |
try:
|
23 |
preds = preds.replace('De el', 'Del').replace('de el', 'del').replace(' ', ' ')
|
24 |
if preds[0].islower():
|
|
|
27 |
|
28 |
# Nombres en mayusculas
|
29 |
prev_letter = ''
|
30 |
+
for word in input_sentence.split(' '):
|
31 |
if word:
|
32 |
if word[0].isupper():
|
33 |
if word.lower() in preds:
|