修改app.py
This commit is contained in:
10
app.py
10
app.py
@ -47,8 +47,10 @@ def item_analysis(stream_dict):
|
||||
if stream_dict['goodsPic'] is not None:
|
||||
response = requests.get(stream_dict['goodsPic'])
|
||||
std_img = Image.open(BytesIO(response.content))
|
||||
description_dict = get_product_description(std_img, track_imgs, initModel.qwen_model, initModel.processor)
|
||||
print(description_dict)
|
||||
description_dict = get_product_description(std_img,
|
||||
track_imgs,
|
||||
initModel.qwen_model,
|
||||
initModel.processor)
|
||||
return description_dict
|
||||
|
||||
|
||||
@ -77,10 +79,10 @@ def aiReview(): # put application's code here
|
||||
data[key] = None
|
||||
logging.error(f'{key} is null')
|
||||
# stream_pipeline(data)
|
||||
item_analysis(data)
|
||||
description_dict = item_analysis(data)
|
||||
end = time.time()
|
||||
logging.info(f'aiReview cost {end - start}s')
|
||||
return 0
|
||||
return description_dict
|
||||
|
||||
|
||||
# def main():
|
||||
|
Reference in New Issue
Block a user