This folder contains sample code for running the CogVLM2-Video model.
Before executing the code, please make sure that the dependencies in basic_demo and the additional dependencies in the current folder have been correctly installed.
pip install -r requirements.txtRun this code to start a conversation in the command line. Please note that to run this code, the model must be loaded on a GPU
CUDA_VISIBLE_DEVICES=0 python cli_demo.pyRun this code to launch a Restful API server:
python api_demo.pyThis will start a Restful API on the 5000 port. Run following code to make a request to the server:
python test_api.pyAfter launch the Restful API server, you can run this code to start a Gradio web demo:
python gradio_demo.pyThen open the browser and visit http://0.0.0.0:7868/ to chat with the model.