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(
166
166
from bentoml.service.artifacts.common import PickleArtifact
167
167
from bentoml.adapters import JsonInput
168
168
from bentoml.types import JsonSerializable
169
-
169
+
170
170
if not os.getenv("UNBOX_DO_NOT_LOAD_MODEL"):
171
171
cwd = os.getcwd()
172
172
os.chdir(os.path.dirname(os.path.abspath(__file__)))
@@ -181,7 +181,7 @@ def predict(self, parsed_json: JsonSerializable):
181
181
{ _extract_input_from_json (task_type , from_csv_path = False )}
182
182
{ _predict_function (model_type )}
183
183
return results
184
-
184
+
185
185
@api(input=JsonInput())
186
186
def predict_from_path(self, parsed_json: JsonSerializable):
187
187
input_path = parsed_json["input_path"]
@@ -211,7 +211,7 @@ def tokenize_from_path(self, parsed_json: JsonSerializable):
211
211
if "tokenizer" in self.artifacts.kwargs:
212
212
results = self.artifacts.kwargs["tokenizer"](input)
213
213
with open(output_path, 'w') as f:
214
- if type(results) == list:
214
+ if type(results) is list:
215
215
json.dump(results, f)
216
216
else:
217
217
json.dump(results.tolist(), f)
You can’t perform that action at this time.
0 commit comments