inoki-giskard commited on
Commit
c1a5e7e
1 Parent(s): 6dbdec2

Remove leading spaces

Browse files
Files changed (1) hide show
  1. text_classification.py +2 -2
text_classification.py CHANGED
@@ -28,7 +28,7 @@ def get_labels_and_features_from_dataset(ds):
28
  if len(label_keys) == 0: # no labels found
29
  # return everything for post processing
30
  return list(dataset_features.keys()), list(dataset_features.keys()), None
31
-
32
  labels = None
33
  if not isinstance(dataset_features[label_keys[0]], datasets.ClassLabel):
34
  if hasattr(dataset_features[label_keys[0]], "feature"):
@@ -90,7 +90,7 @@ def hf_inference_api(model_id, hf_token, payload):
90
 
91
  if not hasattr(response, "status_code") or response.status_code != 200:
92
  logger.warning(f"Request to inference API returns {response}")
93
-
94
  try:
95
  output = response.json()
96
  if "error" in output and "Input is too long" in output["error"]:
 
28
  if len(label_keys) == 0: # no labels found
29
  # return everything for post processing
30
  return list(dataset_features.keys()), list(dataset_features.keys()), None
31
+
32
  labels = None
33
  if not isinstance(dataset_features[label_keys[0]], datasets.ClassLabel):
34
  if hasattr(dataset_features[label_keys[0]], "feature"):
 
90
 
91
  if not hasattr(response, "status_code") or response.status_code != 200:
92
  logger.warning(f"Request to inference API returns {response}")
93
+
94
  try:
95
  output = response.json()
96
  if "error" in output and "Input is too long" in output["error"]: