# ChatPDF **Repository Path**: currenttime11/ChatPDF ## Basic Information - **Project Name**: ChatPDF - **Description**: ChatPDFChatPDFChatPDF - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-07-31 - **Last Updated**: 2024-02-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
## 使用说明
#### 安装依赖
在终端中输入下面的命令,然后回车即可。
```shell
pip install -r requirements.txt
```
如果您在使用Windows,建议通过WSL,在Linux上安装。如果您没有安装CUDA,并且不想只用CPU跑大模型,请先安装CUDA。
如果下载慢,建议配置豆瓣源。
#### 本地调用
请使用下面的命令。取决于你的系统,你可能需要用python或者python3命令。请确保你已经安装了Python。
```shell
CUDA_VISIBLE_DEVICES=0 python chatpdf.py --gen_model_type auto --gen_model_model 01-ai/Yi-6B-Chat --corpus_files sample.pdf --rerank_model_name maidalun1020/bce-reranker-base_v1
```
#### 启动Web服务
```shell
CUDA_VISIBLE_DEVICES=0 python webui.py --gen_model_type auto --gen_model_model 01-ai/Yi-6B-Chat --corpus_files sample.pdf --share
```
如果一切顺利,现在,你应该已经可以在浏览器地址栏中输入 http://localhost:7860 查看并使用 ChatPDF 了。
## Contact
- Issue(建议):[](https://github.com/shibing624/ChatPDF/issues)
- 邮件我:xuming: xuming624@qq.com
- 微信我:加我*微信号:xuming624, 备注:姓名-公司-NLP* 进NLP交流群。
## License
授权协议为 [The Apache License 2.0](LICENSE),可免费用做商业用途。请在产品说明中附加ChatPDF的链接和授权协议。
## Contribute
项目代码还很粗糙,如果大家对代码有所改进,欢迎提交回本项目。
## Reference
- [imClumsyPanda/langchain-ChatGLM](https://github.com/imClumsyPanda/langchain-ChatGLM)
#### 关联项目推荐
- [shibing624/MedicalGPT](https://github.com/shibing624/MedicalGPT):训练自己的GPT大模型,实现了包括增量预训练、有监督微调、RLHF(奖励建模、强化学习训练)和DPO(直接偏好优化)