Add preprocessing time to response
This commit is contained in:
parent
e824a1c151
commit
3ddc3dace0
@ -127,6 +127,27 @@ def process_file(data):
|
||||
}
|
||||
|
||||
|
||||
|
||||
# invoice_files = [
|
||||
# ('invoice_file', ('invoice.pdf', open("test_samples/20220303025923NHNE_20220222_Starhub_Order_Confirmation_by_Email.pdf", "rb").read())),
|
||||
# ]
|
||||
invoice_files = [
|
||||
('invoice_file', ('invoice.jpg', open("test_samples/sbt/invoice.jpg", "rb").read())),
|
||||
]
|
||||
imei_files = [
|
||||
('imei_files', ("test_samples/sbt/imei1.jpg", open("test_samples/sbt/imei1.jpg", "rb").read())),
|
||||
# ('imei_files', ("test_samples/sbt/imei2.jpg", open("test_samples/sbt/imei2.jpg", "rb").read())),
|
||||
# ('imei_files', ("test_samples/sbt/imei3.jpg", open("test_samples/sbt/imei3.jpg", "rb").read())),
|
||||
# ('imei_files', ("test_samples/sbt/imei4.jpeg", open("test_samples/sbt/imei4.jpeg", "rb").read())),
|
||||
# ('imei_files', ("test_samples/sbt/imei5.jpg", open("test_samples/sbt/imei5.jpg", "rb").read())),
|
||||
]
|
||||
def get_imei_files():
|
||||
num_files = random.randint(1, len(imei_files) + 1)
|
||||
files = imei_files[:num_files]
|
||||
# print("Num of imei files:", len(files))
|
||||
return files
|
||||
def get_files():
|
||||
return invoice_files + imei_files # get_imei_files()
|
||||
def gen_input(num_input):
|
||||
for _ in range(num_input):
|
||||
yield (None, token)
|
||||
|
Loading…
Reference in New Issue
Block a user