File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -114,12 +114,12 @@ def predict(**args):
114
114
"augment for segmentation has not been supported yet"
115
115
)
116
116
with tempfile .TemporaryDirectory () as tmpdir :
117
- for f in [args ["input " ]]:
117
+ for f in [args ["files " ]]:
118
118
shutil .copy (
119
119
f .filename , tmpdir + "/" + f .original_filename
120
120
)
121
121
122
- args ["input " ] = [
122
+ args ["files " ] = [
123
123
os .path .join (tmpdir , t ) for t in os .listdir (tmpdir )
124
124
]
125
125
result = aimodel .predict (** args )
@@ -267,11 +267,11 @@ def main():
267
267
else :
268
268
logger .debug ("Calling method with args: %s" , args )
269
269
del vars (args )["method" ]
270
- if hasattr (args , "input " ):
270
+ if hasattr (args , "files " ):
271
271
file_extension = os .path .splitext (args .input )[1 ]
272
- args .input = UploadedFile (
272
+ args .files = UploadedFile (
273
273
"input" ,
274
- args .input ,
274
+ args .files ,
275
275
"application/octet-stream" ,
276
276
f"input{ file_extension } " ,
277
277
)
You can’t perform that action at this time.
0 commit comments