Skip to content

Commit 35490e5

Browse files
committed
Back compatibility.
1 parent 544b61c commit 35490e5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

diaparser/catalog/catalog.py

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
RELEASE = 'v1.0'
1919
DOWNLOAD_URL = f'https://github.com/Unipisa/diaparser/releases/download/{RELEASE}'
20-
UPLOAD_URL = f'https://uploads.github.com/repos/Unipisa/diaparser/releases/{RELEASE}/assets'
21-
UPLOAD_COMMAND = f'curl -X POST -H "Content-Type: application/zip" {UPLOAD_URL}'
2220

2321
DEFAULT_CATALOG_URL = DOWNLOAD_URL
2422
DEFAULT_CATALOG_VERSION = __models_version__

diaparser/parsers/parser.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ def predict(self, data, pred=None, buckets=8, batch_size=5000, prob=False, **kwa
151151
self.transform.eval()
152152
if args.prob:
153153
self.transform.append(Field('probs'))
154-
if args.text:
154+
if hasattr(args, 'text') and args.text \
155+
or hasattr(args, 'lang') and args.lang: # PATCH: back compatibility
155156
self.transform.reader = Tokenizer(args.text, dir=args.cache_dir).reader()
156157

157158
logger.info("Loading the data")

0 commit comments

Comments
 (0)