Open nUser0 opened 3 months ago
I changed the single quotes to double quotes and the above problem was solved. But for some reason it always downloads the model from the Internet, even though I have set the path to the local model.
I know, I need to modify the model parameters: python demo/demo.py --image_path demo/einstein.jpg --text "Question: What is unusual about this image?\nAnswer:" --model hpt-air-demo- local
change the bert config in modeling_hformer.py bert = 'xxx/bert-base-uncased' print('local bert:', bert) encoder_config = BertConfig.from_pretrained(bert)
(HPT) D:\HPT>python demo/demo.py --image_path demo/einstein.jpg --text 'Question: What is unusual about this image?\nAnswer:' --model hpt-air-demo usage: demo.py [-h] --image_path IMAGE_PATH [IMAGE_PATH ...] --text TEXT --model MODEL [--nproc NPROC] [--verbose] demo.py: error: unrecognized arguments: What is unusual about this image?\nAnswer:'