File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ def create_template_model(
166166 from bentoml.service.artifacts.common import PickleArtifact
167167 from bentoml.adapters import JsonInput
168168 from bentoml.types import JsonSerializable
169-
169+
170170 if not os.getenv("UNBOX_DO_NOT_LOAD_MODEL"):
171171 cwd = os.getcwd()
172172 os.chdir(os.path.dirname(os.path.abspath(__file__)))
@@ -181,7 +181,7 @@ def predict(self, parsed_json: JsonSerializable):
181181 { _extract_input_from_json (task_type , from_csv_path = False )}
182182 { _predict_function (model_type )}
183183 return results
184-
184+
185185 @api(input=JsonInput())
186186 def predict_from_path(self, parsed_json: JsonSerializable):
187187 input_path = parsed_json["input_path"]
@@ -211,7 +211,7 @@ def tokenize_from_path(self, parsed_json: JsonSerializable):
211211 if "tokenizer" in self.artifacts.kwargs:
212212 results = self.artifacts.kwargs["tokenizer"](input)
213213 with open(output_path, 'w') as f:
214- if type(results) == list:
214+ if type(results) is list:
215215 json.dump(results, f)
216216 else:
217217 json.dump(results.tolist(), f)
You can’t perform that action at this time.
0 commit comments