# qa **Repository Path**: cqasen/qa ## Basic Information - **Project Name**: qa - **Description**: 基于streamlit构建的QA本地知识库问答系统。 - **Primary Language**: Unknown - **License**: Zlib - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 0 - **Created**: 2023-12-29 - **Last Updated**: 2024-04-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: 知识库问答, streamlit, streamlit ## README # QA系统 > 基于streamlit构建的QA本地知识库问答系统。 > > 问答模型1:https://huggingface.co/wptoux/albert-chinese-large-qa > > 问答模型2:https://huggingface.co/hfl/chinese-pert-large-mrc > > 两个问答模型任选其一 > > embeddings的模型采用的是 BAAI/bge-small-zh-v1.5 > > 新增阿里云大模型(https://dashscope.console.aliyun.com/),通义千问2.1(qwen-max)API ,需要再配置文件.env中配置DASHSCOPE_API_KEY参数,dashscope 的API_KEY 后续都基于通义千问开发 ## 安装 ``` # 创建一个名为 venv 的 Python 虚拟环境 python -m venv venv # 激活虚拟环境 .\venv\Scripts\activate # 在 venv 虚拟环境中安装 requirements.txt 中列出的软件包 pip install -r .\requirements.txt ``` ## 模型下载工具 ``` # 下载模型 python.\download_model.py ``` ## 启动 ``` # 运行app.py文件中的代码 streamlit run app.py ``` ## 示例 ### 文档配置 ![image](./images/demo1.png) ### 问答演示 #### 问题1 ##### 模型 wptoux/albert-chinese-large-qa 示例 ![image](./images/demo3.png) ##### 模型 hfl/chinese-pert-large-mrc 示例 ![image](./images/demo2.png) #### 问题2 ##### 模型 hfl/chinese-pert-large-mrc 示例 ![image](./images/demo4.png) ##### 模型 wptoux/albert-chinese-large-qa 示例 ![image](./images/demo5.png) ##### 调用的阿里云通义千问2.1(qwen-max) ![image](./images/demo7.png) #### 调用的阿里云通义千问2.1(qwen-max) ![image](./images/demo6.png) #### 页面布局调整 ![image](./images/demo8.png)