This script is designed to send an image and a prompt to inference server running the CogVLM model.
clone repository and navigate to root directory
git clone https://github.com/roboflow/cog-vlm-client.git
cd cog-vlm-client
setup python environment and activate it [optional]
python3 -m venv venv
source venv/bin/activate
install required dependencies
pip install -r requirements.txt
download example image
./setup.sh
--image
: Specifies the path to the image file that will be sent to the inference
server.--prompt
: The prompt text that accompanies the image in the request to the CogVLM
model.--port
(optional): The port number of the API. Defaults to 9001
if not specified.--address
(optional): The address of the API. Defaults to http://localhost
if not
specified.--api_key
(optional): The Roboflow API key used for authentication with the API. If
not provided, the script will look for the ROBOFLOW_API_KEY
environment variable.python script.py --image "data/tire.jpg" --prompt "read serial number from tire"