Browse Source

implement feedback

pull/861/head
Christian Gill 4 years ago
parent
commit
62f373f061
1 changed files with 2 additions and 2 deletions
  1. 4
      app/api/utils.py

4
app/api/utils.py

@ -386,9 +386,9 @@ class ExcelParser(FileParser):
data = []
# Only text column
if len(row) <= len(columns) and len(row) == 1:
data.append({'text': row[0] })
data.append({'text': row[0]})
# Text, labels and metadata columns
elif len(row) <= len(columns) and len(row) >= 2:
elif 2 <= len(row) <= len(columns):
datum = dict(zip(columns, row))
text, label = datum.pop('text'), datum.pop('label')
meta = FileParser.encode_metadata(datum)

Loading…
Cancel
Save