A simple set up for running RAG with images,different from tradition RAG which normally process text-only content. For IBM internal development, feel free to use BAM as an alternative, for pilot case please use watsonx, in case you suffered from SDK transition.
Warning: Streaming method in ibm machine learning has issue displaying Chinese, hence in watsonx mode, result will be showed only when generation is completed.
Before running the script, ensure you have the following prerequisites:
- docker or podman
- docker-compose
-
Clone the repository or download the script to your local machine.
-
Create a
.env
file from.env_template
-
To use watsonx, please make sure set the USE_WATSONX to True, and fill out the API Key and Project ID.
To use service:
- Execute
docker-compose up -d
under the repo - Open localhost:8015
- Upload the PDF you want to chat with.
- Wait a moment
- Select your document on the sidebar
- Start your chat
This script is provided under the MIT License. You are free to use, modify, and distribute it as needed.