HyperGAI / HPT

HPT - Open Multimodal LLMs from HyperGAI
https://www.hypergai.com/
Apache License 2.0
301 stars 14 forks source link

After I completed the deployment and executed the demo: #3

Open nUser0 opened 3 months ago

nUser0 commented 3 months ago

(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:'

nUser0 commented 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.

nUser0 commented 3 months ago

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

zhouxingguang commented 3 months ago

change the bert config in modeling_hformer.py bert = 'xxx/bert-base-uncased' print('local bert:', bert) encoder_config = BertConfig.from_pretrained(bert)