2023-08-11 06:35:19 +00:00
|
|
|
# LangChain Document QA
|
|
|
|
|
|
|
|
This example provides an interface for asking questions to a PDF document.
|
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
2024-09-25 18:11:22 +00:00
|
|
|
1. Ensure you have the `llama3.2` model installed:
|
2024-07-30 06:56:37 +00:00
|
|
|
|
|
|
|
```
|
2024-09-25 18:11:22 +00:00
|
|
|
ollama pull llama3.2
|
2024-07-30 06:56:37 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
2. Install the Python Requirements.
|
|
|
|
|
2023-08-11 06:35:19 +00:00
|
|
|
```
|
|
|
|
pip install -r requirements.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
## Run
|
|
|
|
|
|
|
|
```
|
|
|
|
python main.py
|
|
|
|
```
|
|
|
|
|
|
|
|
A prompt will appear, where questions may be asked:
|
|
|
|
|
|
|
|
```
|
|
|
|
Query: How many locations does WeWork have?
|
|
|
|
```
|