Update README.md
Browse files
README.md
CHANGED
|
@@ -90,11 +90,23 @@ Install `gradio` first.
|
|
| 90 |
pip install gradio
|
| 91 |
```
|
| 92 |
|
| 93 |
-
|
| 94 |
|
| 95 |
-
- For
|
| 96 |
-
- For
|
| 97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
- If you encountered an error, please open an issue [here](https://huggingface.co/RhapsodyAI/minicpm-visual-embedding-v0/discussions), we will respond soon.
|
| 99 |
|
| 100 |
|
|
|
|
| 90 |
pip install gradio
|
| 91 |
```
|
| 92 |
|
| 93 |
+
Clone demo source code.
|
| 94 |
|
| 95 |
+
- For retrieval-only demo (without generation), you should clone https://huggingface.co/spaces/bokesyo/MiniCPM_Visual_Document_Retriever_Demo.
|
| 96 |
+
- For retrieval and generation (full RAG pipeline), you should clone https://huggingface.co/spaces/bokesyo/MiniCPMV-RAG-PDFQA.
|
| 97 |
+
|
| 98 |
+
```bash
|
| 99 |
+
git clone https://huggingface.co/spaces/bokesyo/MiniCPM_Visual_Document_Retriever_Demo
|
| 100 |
+
git clone https://huggingface.co/spaces/bokesyo/MiniCPMV-RAG-PDFQA
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
For `retrieval and generation` demo, you need to also install `flash_attn`.
|
| 104 |
+
|
| 105 |
+
Adapt the code in `app.py` according to your device.
|
| 106 |
+
|
| 107 |
+
- For M1/M2/M3 users, please make sure `model = model.to(device='mps', dtype=torch.float16)` then run `PYTORCH_ENABLE_MPS_FALLBACK=1 python app.py`.
|
| 108 |
+
- For x86 CPU users, please remove `model = model.to(device)` then run `python app.py`.
|
| 109 |
+
- For x86 CPU + Nvidia GPU users, please make sure `model = model.to('cuda')` then run `python app.py`.
|
| 110 |
- If you encountered an error, please open an issue [here](https://huggingface.co/RhapsodyAI/minicpm-visual-embedding-v0/discussions), we will respond soon.
|
| 111 |
|
| 112 |
|